New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added redigo based IAttackStore implementation #66
Conversation
models/db.go
Outdated
} | ||
if attackIDs, ok := res.([]interface{}); !ok { | ||
return nil | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (from golint
)
models/db.go
Outdated
|
||
if err := json.Unmarshal(res.([]byte), &attack); err != nil { | ||
return nil | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (from golint
)
…com/nitishm/vegeta-server into nitishm/enhancement/22/iattackstore
models/db.go
Outdated
} | ||
|
||
func (r Redis) GetAll(filterParams FilterParams) []AttackDetails { | ||
var attacks []AttackDetails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider preallocating attacks
(from prealloc
)
Fixes #22 |
Added a redigo based redis store attack and report