aboutsummaryrefslogtreecommitdiff
path: root/cmd/anubis/policy.go
diff options
context:
space:
mode:
authorAlexander Yastrebov <yastrebov.alex@gmail.com>2025-03-21 20:46:43 +0100
committerGitHub <noreply@github.com>2025-03-21 15:46:43 -0400
commit194e55088bfd90130f3044c4e3fb5b0f0b8ec2ed (patch)
tree38f734f5608842aba503f2d120f62cfb2f3169f1 /cmd/anubis/policy.go
parent4ec4dc3624a9115cb767bb21809059f8052b5763 (diff)
downloadanubis-194e55088bfd90130f3044c4e3fb5b0f0b8ec2ed.tar.xz
anubis-194e55088bfd90130f3044c4e3fb5b0f0b8ec2ed.zip
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>
Diffstat (limited to 'cmd/anubis/policy.go')
-rw-r--r--cmd/anubis/policy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/anubis/policy.go b/cmd/anubis/policy.go
index 4e594fc..5de5e72 100644
--- a/cmd/anubis/policy.go
+++ b/cmd/anubis/policy.go
@@ -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) {