|
|
@ -98,13 +98,21 @@ func (w wordBag) wordString(n int) string {
|
|
|
|
return buf.String()
|
|
|
|
return buf.String()
|
|
|
|
case remaining < 8:
|
|
|
|
case remaining < 8:
|
|
|
|
buf.WriteString(w.randomWordN(remaining))
|
|
|
|
buf.WriteString(w.randomWordN(remaining))
|
|
|
|
|
|
|
|
if rand.Float64() > 0.8 {
|
|
|
|
|
|
|
|
buf.WriteRune('\n')
|
|
|
|
|
|
|
|
} else {
|
|
|
|
buf.WriteRune(' ')
|
|
|
|
buf.WriteRune(' ')
|
|
|
|
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
buf.WriteString(w.randomWordBelow(remaining))
|
|
|
|
buf.WriteString(w.randomWordBelow(remaining))
|
|
|
|
|
|
|
|
if rand.Float64() > 0.8 {
|
|
|
|
|
|
|
|
buf.WriteRune('\n')
|
|
|
|
|
|
|
|
} else {
|
|
|
|
buf.WriteRune(' ')
|
|
|
|
buf.WriteRune(' ')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// command-line length argument parsing type. Line lengths can be specified as
|
|
|
|
// command-line length argument parsing type. Line lengths can be specified as
|
|
|
|
// either integers or strings, with strings naming known length-generating
|
|
|
|
// either integers or strings, with strings naming known length-generating
|
|
|
|