code: func writeGoFile(base string, pkg string, name string, meta []Type, ts string) error {
  	filename := base + "/" + pkg + "/" + strings.ToLower(name) + ".go"
  
  	// Generate the source
  	var buf bytes.Buffer
  	t := template.New(pkg).Funcs(fMap)
  	template.Must(t.Parse(ts)).Execute(&buf, meta)
  
  	/*if pkg == "services" && name == "Account"{
  		fmt.Println(string(buf.String()))
  		os.Exit(0)
  	}*/
  
  	// Add the imports
  	src, err := imports.Process(filename, buf.Bytes(), &imports.Options{Comments: true})
  	if err != nil {
  		fmt.Printf("Error processing imports: %s", err)
  	}
  
  	// Format
  	pretty, err := format.Source(src)
  	if err != nil {
  		return fmt.Errorf("Error while formatting source: %s", err)
  	}
  
  	f, err := os.Create(filename)
  	if err != nil {
  		return fmt.Errorf("Error creating file: %s", err)
  	}
  	defer f.Close()
  	fmt.Fprintf(f, "%s", pretty)
  
  	return nil
  }
docs: // Executes a template against the metadata structure, and generates a go source file with the result