chore(convention): Respect Go convention, package name should be lowercase
This commit is contained in:
14
generator/labels/labelstructs/envFrom.go
Normal file
14
generator/labels/labelstructs/envFrom.go
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user