more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-24 18:26:16 +02:00
commit 0de6f3a76e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
57 changed files with 168 additions and 241 deletions

View file

@ -64,20 +64,15 @@ func (j *JSResponse) UpdateHash() {
}
func (j *JSResponse) WasModified() bool {
if j.bodyRead == true {
if j.bodyRead {
// body was read
return true
} else if j.Body != "" {
// body was not read but just set
return true
}
// check if any of the fields has been changed
newHash := j.NewHash()
if newHash != j.refHash {
return true
}
return false
return j.NewHash() != j.refHash
}
func (j *JSResponse) GetHeader(name, deflt string) string {