// Returns package name and message name.
Returns package name and message name.
// Returns package name and message name .
func convert(inType string) (string, string) {
	segments := strings.Split(inType, ".")
	outPackageSegments := []string{}
	outMessageSegments := []string{}
	for _, s := range segments {
		if s == "" {
			continue
		}
		r, _ := utf8.DecodeRuneInString(s)
		if unicode.IsLower(r) {
			outPackageSegments = append(outPackageSegments, firstUpper(s))
		} else {
			outMessageSegments = append(outMessageSegments, firstUpper(s))
		}
	}
	return strings.Join(outPackageSegments, "."), strings.Join(outMessageSegments, "_")
}
func convert ( inType string ) ( string , string ) { segments := strings . Split ( inType , " " ) outPackageSegments := [ ] string { } outMessageSegments := [ ] string { } for _ , s := range segments { if s == " " { continue } r , _ := utf8 . DecodeRuneInString ( s ) if unicode . IsLower ( r ) { outPackageSegments = append ( outPackageSegments , firstUpper ( s ) ) } else { outMessageSegments = append ( outMessageSegments , firstUpper ( s ) ) } } return strings . Join ( outPackageSegments , " " ) , strings . Join ( outMessageSegments , " " ) }
Returns package name and message name.
Returns package name and message name .
// Package name. // Message name.