Extract main logic into attack function and test it

This commit is contained in:
Tomás Senart
2013-08-14 17:30:13 +02:00
parent 8c26088706
commit c1e4962972
4 changed files with 63 additions and 34 deletions

View File

@@ -17,8 +17,8 @@ type TextReporter struct {
}
// NewTextReporter initializes a TextReporter with n responses
func NewTextReporter(n int) *TextReporter {
return &TextReporter{responses: make([]*Response, n)}
func NewTextReporter() *TextReporter {
return &TextReporter{responses: make([]*Response, 0)}
}
// Add adds a response to be used in the report