Created
December 24, 2015 07:47
-
-
Save kunalkushwaha/6d2142e5e0cf1c365562 to your computer and use it in GitHub Desktop.
dumpYAML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //FIXME: Debug function need to remove at final PR | |
| func dumpYAMLConfig(filename string, document []machineConfig) { | |
| fileToWrite, err := os.Create(filename) | |
| if err != nil { | |
| println("Failed to open file for writing:", err.Error()) | |
| } | |
| encoder := yaml.NewEncoder(fileToWrite) | |
| err = encoder.Encode(document) | |
| if err != nil { | |
| println("Failed to encode document:", err.Error()) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment