code: func convertYAMLError(yamlError string) string {
  
  	if strings.Contains(yamlError, "cannot unmarshal") {
  
  		yamlErrorParts := strings.Split(yamlError, " ")
  
  		if len(yamlErrorParts) >= 7 {
  
  			fmt.Println(yamlError)
  
  			var ok bool
  			var source string
  			var target string
  			var targetName string
  			line := yamlErrorParts[1]
  			line = line[:len(line)-1]
  
  			// TODO: support more complex types:
  			// map[string]raml.NamedParameter -->
  			// detect map, format to:
  			//   "mapping of %s to %s", ramlTypeNames["string"], ramlTypeNames["raml.NamedParameter"]
  			// if "string" is not found, use the key, i.e. "string" in this case.
  			// so the output would be:
  			//   mapping of string to named parameter
  
  			// TODO: instead of having string in the key of some mappings,
  			// perhaps use a type alias:
  			//   type Name string
  			//   map[Name]NamedParameter
  			// would output:
  			//   mapping of name string to named parameter
  
  			if source, ok = yamlTypeToName[yamlErrorParts[4]]; !ok {
  				source = yamlErrorParts[4]
  			}
  			fmt.Println("source: ", source)
  
  			if source == "string" {
  				source = fmt.Sprintf("string (got %s)", yamlErrorParts[5])
  				target = yamlErrorParts[7]
  			} else {
  				target = yamlErrorParts[6]
  
  			}
  			if targetName, ok = ramlTypeNames[target]; !ok {
  				targetName = target
  			}
  
  			target, _ = ramlTypes[target]
  
  			return fmt.Sprintf("line %s: %s cannot be of "+
  				"type %s, must be %s", line, targetName, source, target)
  
  		}
  	}
  
  	// Otherwise
  	return fmt.Sprintf("YAML error, %s", yamlError)
  }
docs: // Convert a YAML error string into RAML error string, with more context