mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-12 22:11:15 +00:00
14 lines
240 B
Go
14 lines
240 B
Go
// Package sample is used as test input for golangci action.
|
|
package sample
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
// Hash~
|
|
func Hash(data string) string {
|
|
h := md5.New()
|
|
h.Write([]byte(data))
|
|
return hex.EncodeToString(h.Sum(nil))
|
|
}
|