chore: go mod tidy / vendor / make deps
This commit is contained in:
11
vendor/github.com/docker/cli/opts/env.go
generated
vendored
11
vendor/github.com/docker/cli/opts/env.go
generated
vendored
@ -7,13 +7,14 @@ import (
|
||||
)
|
||||
|
||||
// ValidateEnv validates an environment variable and returns it.
|
||||
// If no value is specified, it obtains its value from the current environment
|
||||
// If no value is specified, it obtains its value from the current environment.
|
||||
//
|
||||
// As on ParseEnvFile and related to #16585, environment variable names
|
||||
// are not validated, and it's up to the application inside the container
|
||||
// to validate them or not.
|
||||
// Environment variable names are not validated, and it's up to the application
|
||||
// inside the container to validate them (see [moby-16585]). The only validation
|
||||
// here is to check if name is empty, per [moby-25099].
|
||||
//
|
||||
// The only validation here is to check if name is empty, per #25099
|
||||
// [moby-16585]: https://github.com/moby/moby/issues/16585
|
||||
// [moby-25099]: https://github.com/moby/moby/issues/25099
|
||||
func ValidateEnv(val string) (string, error) {
|
||||
k, _, hasValue := strings.Cut(val, "=")
|
||||
if k == "" {
|
||||
|
Reference in New Issue
Block a user