add sample
This commit is contained in:
14
sample/sample.go
Normal file
14
sample/sample.go
Normal file
@ -0,0 +1,14 @@
|
||||
// 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))
|
||||
}
|
Reference in New Issue
Block a user