title: Go-yaml control characters are not allowed error
body: <p>I'm trying to make a really simple ssh address book program. Takes some info about ssh addresses and stores them in a yaml document. I'm doing it partly to learn a bit about Go and am having a small problem. I can serialize the data and put a document into a file but I'm getting this error when I try to read it back:<br>
  <code>yaml: control characters are not allowed</code></p>
  
  <p>I'm not sure what this error message means, googling didn't yield any helpful results. Any ideas? </p>
  
  <p>These are the structs I'm using to organize the data:</p>
  
  <pre><code>type EntriesList struct {
      SSHEntries []SSHEntry `yaml:"sshentries"`
  }   
  
  type SSHEntry struct {
      Name    string `yaml:"name"`
      Command SSHCmd `yaml:"command"`
  }   
  
  type SSHCmd struct {
      Addr  string `yaml:"addr"`
      Port  int    `yaml:"port"`
      Uname string `yaml:"uname"`
  }   
  </code></pre>
  
  <p>The format it puts my data into is:</p>
  
  <pre><code>---
  entrieslist:
   - name: entry1
     command:
       addr: somewhere
       port: 22
       uname: someone
   - name: entry2 ... etc 
  </code></pre>
  
  <p>I checked this ^^ with a YAML validator and it is legal YAML. 
  Here is my function to read the file:</p>
  
  <pre><code>// CONF is the path to the file
  func readConf(CONF string) *EntriesList {
      configFile := openConfigFile(CONF)
      defer configFile.Close()
  
      buffer := make([]byte, 512, 512)
      _, err := configFile.Read(buffer)
      check(err)
  
      var entries EntriesList
      err = yaml.Unmarshal(buffer, &amp;entries)
      data, _ := yaml.Marshal(entries)
      fmt.Println(string(data))
  
      return &amp;entries
  }
  </code></pre>