Sha256: 363a3c372a76ea2749300f182d0a98a8bb88e1f60cdb07441fd48e0551b7e34f
Contents?: true
Size: 353 Bytes
Versions: 154
Compression:
Stored size: 353 Bytes
Contents
// +build !bonus package robotname import ( "fmt" "math/rand" ) const testVersion = 1 type Robot struct { name string } func (r *Robot) Name() string { if r.name == "" { r.name = fmt.Sprintf("%c%c%03d", 'A'+byte(rand.Intn(26)), 'A'+byte(rand.Intn(26)), rand.Intn(1000)) } return r.name } func (r *Robot) Reset() { *r = Robot{} }
Version data entries
154 entries across 154 versions & 1 rubygems