fix go lint warnings

- handle errors where possible
- explicitly ignore errors where it makes sense to
- fix deprecations and unused var
This commit is contained in:
Will Norris 2020-06-19 18:08:35 -07:00
parent 5600290c82
commit fc79b851b2
7 changed files with 31 additions and 19 deletions

View file

@ -54,7 +54,9 @@ func sign(key string, s string, urlOnly bool) ([]byte, error) {
}
mac := hmac.New(sha256.New, []byte(k))
mac.Write([]byte(u.String()))
if _, err := mac.Write([]byte(u.String())); err != nil {
return nil, err
}
return mac.Sum(nil), nil
}