1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Refactor configuration

This commit is contained in:
Darren Shepherd
2015-03-14 21:27:04 -07:00
parent 0f8eb3e21d
commit ac2459ba37
10 changed files with 600 additions and 303 deletions

View File

@@ -10,6 +10,7 @@ import (
"syscall"
"github.com/docker/docker/pkg/mount"
"gopkg.in/yaml.v2"
)
var (
@@ -154,3 +155,12 @@ func RandSeq(n int) string {
}
return string(b)
}
func Convert(from, to interface{}) error {
bytes, err := yaml.Marshal(from)
if err != nil {
return err
}
return yaml.Unmarshal(bytes, to)
}