mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2026-04-26 05:28:50 +00:00
Fix problems parsing
This commit is contained in:
parent
b030249340
commit
f7d08adb03
5 changed files with 11 additions and 4 deletions
|
|
@ -4,11 +4,18 @@ package sample
|
|||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Hash~
|
||||
func Hash(data string) string {
|
||||
retError()
|
||||
|
||||
h := md5.New()
|
||||
h.Write([]byte(data))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
func retError() error {
|
||||
return errors.New("err")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue