inflect.go
func (rs *Ruleset) Humanize(word string) string {
	word = replaceLast(word, "_id", "") // strip foreign key kinds
	// replace and strings in humans list
	for _, rule := range rs.humans {
		word = strings.Replace(word, rule.suffix, rule.replacement, -1)
	}
	sentance := rs.seperatedWords(word, " ")
	return strings.ToUpper(sentance[:1]) + sentance[1:]
}
func (rs *Ruleset) Humanize(word string) string {
	word = replaceLast(word, "_id", "") // strip foreign key kinds
	// replace and strings in humans list
	for _, rule := range rs.humans {
		word = strings.Replace(word, rule.suffix, rule.replacement, -1)
	}
	sentance := rs.seperatedWords(word, " ")
	return strings.ToUpper(sentance[:1]) + sentance[1:]
}
func ( rs * Ruleset ) Humanize ( word string ) string { word = replaceLast ( word , " " , " " ) // strip foreign key kinds // replace and strings in humans list for _ , rule := range rs . humans { word = strings . Replace ( word , rule . suffix , rule . replacement , - 1 ) } sentance := rs . seperatedWords ( word , " " ) return strings . ToUpper ( sentance [ : 1 ] ) + sentance [ 1 : ] }
// First letter of sentance captitilized
// Uses custom friendly replacements via AddHuman()
First letter of sentance captitilized Uses custom friendly replacements via AddHuman ()