code: func parseIntoEnvVar(spec []string, defaultReader io.Reader, envVarType string) ([]v1.EnvVar, []string, error) {
  	env := []v1.EnvVar{}
  	exists := sets.NewString()
  	var remove []string
  	for _, envSpec := range spec {
  		switch {
  		case !IsValidEnvironmentArgument(envSpec) && !strings.HasSuffix(envSpec, "-"):
  			return nil, nil, fmt.Errorf("%ss must be of the form key=value and can only contain letters, numbers, and underscores", envVarType)
  		case envSpec == "-":
  			if defaultReader == nil {
  				return nil, nil, fmt.Errorf("when '-' is used, STDIN must be open")
  			}
  			fileEnv, err := readEnv(defaultReader, envVarType)
  			if err != nil {
  				return nil, nil, err
  			}
  			env = append(env, fileEnv...)
  		case strings.Index(envSpec, "=") != -1:
  			parts := strings.SplitN(envSpec, "=", 2)
  			if len(parts) != 2 {
  				return nil, nil, fmt.Errorf("invalid %s: %v", envVarType, envSpec)
  			}
  			exists.Insert(parts[0])
  			env = append(env, v1.EnvVar{
  				Name:  parts[0],
  				Value: parts[1],
  			})
  		case strings.HasSuffix(envSpec, "-"):
  			remove = append(remove, envSpec[:len(envSpec)-1])
  		default:
  			return nil, nil, fmt.Errorf("unknown %s: %v", envVarType, envSpec)
  		}
  	}
  	for _, removeLabel := range remove {
  		if _, found := exists[removeLabel]; found {
  			return nil, nil, fmt.Errorf("can not both modify and remove the same %s in the same command", envVarType)
  		}
  	}
  	return env, remove, nil
  }
docs: // parseIntoEnvVar parses the list of key-value pairs into kubernetes EnvVar.
  // envVarType is for making errors more specific to user intentions.