From 0f51c7d542227f1f4c9895db36007b9d95963d99 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 29 Oct 2024 21:13:43 +0100 Subject: utils: networks --- utils/yaml_ipam/yaml_ipam.go | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 utils/yaml_ipam/yaml_ipam.go (limited to 'utils/yaml_ipam') diff --git a/utils/yaml_ipam/yaml_ipam.go b/utils/yaml_ipam/yaml_ipam.go deleted file mode 100644 index ff65155..0000000 --- a/utils/yaml_ipam/yaml_ipam.go +++ /dev/null @@ -1,26 +0,0 @@ -package yaml_ipam - -import "gopkg.in/yaml.v3" - -type Ipam struct { - Ipam6 Ipam6 `yaml:"ipam6"` -} - -type Ipam6 struct { - Networks map[string]Network6Yaml `yaml:"networks"` -} - -type Network6Yaml struct { - Range string `yaml:"range"` - Hosts map[string]string `yaml:"hosts"` -} - -func Parse(bs []byte) (Ipam, error) { - var ipam Ipam - err := yaml.Unmarshal(bs, &ipam) - if err != nil { - return Ipam{}, err - } - - return ipam, nil -} -- cgit v1.2.3