1
0
mirror of https://github.com/rancher/os.git synced 2025-09-17 15:40:47 +00:00

ros config get shows default values

This commit is contained in:
Josh Curl
2016-03-31 21:31:46 -07:00
parent ecae451ad1
commit c0c8179813
12 changed files with 103 additions and 18 deletions

View File

@@ -25,7 +25,8 @@ func main() {
println("File does not exist:", err.Error())
os.Exit(1)
}
defer file.Close()
document := new(interface{})
decoder := candiedyaml.NewDecoder(file)
err = decoder.Decode(document)
@@ -41,7 +42,8 @@ func main() {
println("Failed to open file for writing:", err.Error())
os.Exit(1)
}
defer fileToWrite.Close()
encoder := candiedyaml.NewEncoder(fileToWrite)
err = encoder.Encode(document)