It seems that "json" annotation fails to get dashed names (like configmap-files). That means that all labels in katernay.yaml file couldn't be parsed. Using `yaml` annotaiton fixes the problem. Fixes #144.
14 lines
277 B
Go
14 lines
277 B
Go
package labelstructs
|
|
|
|
import "gopkg.in/yaml.v3"
|
|
|
|
type ConfigMapFiles []string
|
|
|
|
func ConfigMapFileFrom(data string) (ConfigMapFiles, error) {
|
|
var mapping ConfigMapFiles
|
|
if err := yaml.Unmarshal([]byte(data), &mapping); err != nil {
|
|
return nil, err
|
|
}
|
|
return mapping, nil
|
|
}
|