Files
katenary/generator/labels/labelStructs/ports.go
Patrice Ferlet cc1019b5a8 chore(refacto): fix secret and use katenary schema
- add possibility to use a katenary.yaml file to setup values
- fix secret generation
2024-11-18 17:12:12 +01:00

15 lines
294 B
Go

package labelStructs
import "gopkg.in/yaml.v3"
type Ports []uint32
// PortsFrom returns a Ports from the given string.
func PortsFrom(data string) (Ports, error) {
var mapping Ports
if err := yaml.Unmarshal([]byte(data), &mapping); err != nil {
return nil, err
}
return mapping, nil
}