// IsEnvironmentArgument checks whether a string is an environment argument, that is, whether it matches the "anycharacters=anycharacters" pattern.
funcIsEnvironmentArgument(sstring)bool{
funcIsEnvironmentArgument(sstring)bool{
returnargumentEnvironment.MatchString(s)
returnargumentEnvironment.MatchString(s)
}
}
// IsValidEnvironmentArgument check str is valid env
// IsValidEnvironmentArgument checks whether a string is a valid environment argument, that is, whether it matches the "wordcharacters=anycharacters" pattern. Word characters can be letters, numbers, and underscores.
funcIsValidEnvironmentArgument(sstring)bool{
funcIsValidEnvironmentArgument(sstring)bool{
returnvalidArgumentEnvironment.MatchString(s)
returnvalidArgumentEnvironment.MatchString(s)
}
}
// SplitEnvironmentFromResources returns resources and envargs
// SplitEnvironmentFromResources separates resources from environment arguments.
// Resources must come first. Arguments may have the "DASH-" syntax.
// ParseEnv parses the elements of the first argument looking for environment variables in key=value form and, if one of those values is "-", it also scans the reader.
// The same environment variable cannot be both modified and removed in the same command.