add sample

This commit is contained in:
Aleksandr Razumov 2020-04-26 03:51:07 +03:00
parent 60b57697f8
commit 6eb54d49f7
No known key found for this signature in database
GPG key ID: 1D14A82D2E311045
3 changed files with 31 additions and 0 deletions

14
sample/sample.go Normal file
View 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))
}