(conn io.Writer)
| 491 | } |
| 492 | |
| 493 | func writeGrease(conn io.Writer) (sent bool, err error) { |
| 494 | if mathrand.IntN(3) == 0 { |
| 495 | return false, nil |
| 496 | } |
| 497 | s := &format.Stanza{Type: fmt.Sprintf("grease-%x", mathrand.Int())} |
| 498 | for i := 0; i < mathrand.IntN(3); i++ { |
| 499 | s.Args = append(s.Args, fmt.Sprintf("%d", mathrand.IntN(100))) |
| 500 | } |
| 501 | if mathrand.IntN(2) == 0 { |
| 502 | s.Body = make([]byte, mathrand.IntN(100)) |
| 503 | rand.Read(s.Body) |
| 504 | } |
| 505 | return true, s.Marshal(conn) |
| 506 | } |
no test coverage detected
searching dependent graphs…