This allows to install katenary with `go install` and to clean up the project folder.
15 lines
306 B
Go
15 lines
306 B
Go
package labelstructs
|
|
|
|
import "gopkg.in/yaml.v3"
|
|
|
|
type EnvFrom []string
|
|
|
|
// EnvFromFrom returns a EnvFrom from the given string.
|
|
func EnvFromFrom(data string) (EnvFrom, error) {
|
|
var mapping EnvFrom
|
|
if err := yaml.Unmarshal([]byte(data), &mapping); err != nil {
|
|
return nil, err
|
|
}
|
|
return mapping, nil
|
|
}
|