예제 #1
0
func (l *Limb) Append(buf []byte, n, total int) []byte {
	buf = append(buf, "It has "...)
	buf = append(buf, language.Number(int(l.Count))...)
	buf = append(buf, " "...)
	buf = append(buf, l.Length.Length()...)
	buf = append(buf, ", "...)
	buf = append(buf, l.Width.Width()...)
	buf = append(buf, " "...)
	buf = append(buf, limbTypeName[l.Type]...)
	if l.Count == 1 {
		buf = append(buf, "-limb with "...)
	} else {
		buf = append(buf, "-limbs, each with "...)
	}
	if l.Joints == 0 {
		buf = append(buf, "no joints. "...)
	} else if l.Joints == 1 {
		buf = append(buf, "one joint. "...)
	} else {
		buf = append(buf, language.Number(int(l.Joints))...)
		buf = append(buf, " joints. "...)
	}

	return buf
}
예제 #2
0
func (t *Tooth) Append(buf []byte, n, total int) []byte {
	buf = append(buf, language.Number(int(t.Count))...)
	buf = append(buf, " "...)
	buf = append(buf, t.Size.String()...)
	buf = append(buf, " "...)
	if t.Count == 1 {
		buf = append(buf, toothTypeName[t.Type]...)
	} else {
		buf = append(buf, teethTypeName[t.Type]...)
	}
	return buf
}
예제 #3
0
func (t *Tail) Append(buf []byte, n, total int) []byte {
	buf = append(buf, "It has "...)
	buf = append(buf, language.Number(int(t.Count))...)
	buf = append(buf, " "...)
	buf = append(buf, t.Length.Length()...)
	buf = append(buf, ", "...)
	buf = append(buf, t.Width.Width()...)
	if t.Count == 1 {
		buf = append(buf, " tail. "...)
	} else {
		buf = append(buf, " tails. "...)
	}

	return buf
}
예제 #4
0
func (e *Eye) Append(buf []byte, n, total int) []byte {
	if e.Count == 1 {
		buf = append(buf, "On its head there is "...)
	} else {
		buf = append(buf, "On its head there are "...)
	}
	buf = append(buf, language.Number(int(e.Count))...)
	buf = append(buf, " "...)
	buf = append(buf, e.Size.String()...)
	if e.Count == 1 {
		buf = append(buf, " eye. "...)
	} else {
		buf = append(buf, " eyes. "...)
	}

	return buf
}