cmd/anubis: do not return error from sha256 (#57)

hash.Write never returns error so removing it from
the results simplifies usage and eliminates dead error handling.

Signed-off-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
This commit is contained in:
Alexander Yastrebov 2025-03-21 20:46:43 +01:00 committed by GitHub
parent 4ec4dc3624
commit 194e55088b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 23 deletions

View file

@ -50,7 +50,7 @@ func (b Bot) Hash() (string, error) {
userAgentRex = b.UserAgent.String()
}
return sha256sum(fmt.Sprintf("%s::%s::%s", b.Name, pathRex, userAgentRex))
return sha256sum(fmt.Sprintf("%s::%s::%s", b.Name, pathRex, userAgentRex)), nil
}
func parseConfig(fin io.Reader, fname string, defaultDifficulty int) (*ParsedConfig, error) {