func toVarName(name string) string {
	p := partsRegexp.ReplaceAllString(name, "_")
	return inflect.CamelizeDownFirst(p)
}
Parse native names into go parameter names
package main
import (
	"encoding/json"
	"fmt"
	"mime"
	"regexp"
	"strings"
	"github.com/go-openapi/inflect"
	"github.com/rightscale/rsc/gen"
)
var (
	partsRegexp = regexp.MustCompile("[^[:alnum:]]+")
	blankRegexp = regexp.MustCompile(`^\s*$`)
)
func toGoReturnTypeName(name string, slice bool) string {
	slicePrefix := ""
	if slice {
		slicePrefix = "[]"
	}
	return fmt.Sprintf("%s*%s", slicePrefix, toGoTypeName(name))
}
func toGoTypeName(name string) string {
	switch name {
	case "string":
		return "string"
	case "integer":
		return "int"
	case "boolean":
		return "bool"
	}
	return name
}