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
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) {