feat(refacto): move everything in internal package
This allows to install katenary with `go install` and to clean up the project folder.
This commit is contained in:
14
internal/generator/labels/labelstructs/mapenv.go
Normal file
14
internal/generator/labels/labelstructs/mapenv.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package labelstructs
|
||||
|
||||
import "gopkg.in/yaml.v3"
|
||||
|
||||
type MapEnv map[string]string
|
||||
|
||||
// MapEnvFrom returns a MapEnv from the given string.
|
||||
func MapEnvFrom(data string) (MapEnv, error) {
|
||||
var mapping MapEnv
|
||||
if err := yaml.Unmarshal([]byte(data), &mapping); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return mapping, nil
|
||||
}
|
Reference in New Issue
Block a user