Fix lint error

Signed-off-by: Arkadii Yakovets <ark@victoriametrics.com>
This commit is contained in:
Arkadii Yakovets 2024-07-10 17:24:44 -07:00
parent 08de878047
commit 4605a72684
No known key found for this signature in database
GPG key ID: 7AEAA43DE7C15E41

View file

@ -58,7 +58,10 @@ func getTag() (string, error) {
if _, ok := err.(*exec.ExitError); ok {
gitDiffStdOut, _ := execCommand("git diff-index -u HEAD").Output()
hashGenerator := sha1.New()
io.WriteString(hashGenerator, string(gitDiffStdOut))
_, err := io.WriteString(hashGenerator, string(gitDiffStdOut))
if err != nil {
return "", err
}
sha1Hex := fmt.Sprintf("%x", hashGenerator.Sum(nil)[0:4])
tag = strings.Join([]string{tag, "-dirty-", sha1Hex}, "")
}