{"modulePath":"github.phpd.cn/openshift/origin","version":"v4.1.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package variable\n\n## Variables\n\n```go\nvar (\n\t// defaultImagePrefix is the default prefix for any container image names.\n\t// This value should be set duing build via -ldflags.\n\tDefaultImagePrefix string\n)\n```\n\n## Functions\n\n```go\nfunc Empty(s string) (string, bool)\n```\nEmpty is a KeyFunc which always returns true and the empty string.\n\n```go\nfunc Env(key string) (string, bool)\n```\nEnv is a KeyFunc which always returns a string\n\n```go\nfunc Expand(s string, fns ...KeyFunc) string\n```\nExpand expands a string and ignores any errors that occur - keys that are not recognized are replaced with the empty string.\n\n```go\nfunc ExpandStrict(s string, fns ...KeyFunc) (string, error)\n```\nExpandStrict expands a string using a series of common format functions\n\n```go\nfunc Identity(key string) (string, bool)\n```\nIdentity is a KeyFunc that returns the same format rules.\n\n```go\nfunc Versions(key string) (string, bool)\n```\nVersions is a KeyFunc for retrieving information about the current version.\n\n## Types\n\n```go\ntype ImageTemplate struct {\n\t// Format is required, set to the image template to pull\n\tFormat string\n\tLatest bool\n\t// EnvFormat is optional, if set will substitute the value of ${component} with any env\n\t// var that matches this format. Is a printf format string accepting a single\n\t// string parameter.\n\tEnvFormat string\n}\n```\nImageTemplate is a class to assist in expanding parameterized Docker image references from configuration or a file\n\n```go\nfunc NewDefaultImageTemplate() ImageTemplate\n```\nNewDefaultImageTemplate returns the default image template\n\n```go\nfunc (t *ImageTemplate) Expand(component string) (string, error)\n```\nExpand expands a string using a series of common format functions\n\n```go\nfunc (t *ImageTemplate) ExpandOrDie(component string) string\n```\nExpandOrDie will either expand a string or exit in case of failure\n\n```go\ntype KeyFunc func(key string) (string, bool)\n```\nKeyFunc returns the value associated with the provided key or false if no such key exists.\n\n","path":"github.phpd.cn/openshift/origin/pkg/cmd/util/variable","name":"variable","synopsis":"","isRedistributable":true}
