Fix problems parsing

This commit is contained in:
Denis Isaev committed 2020-05-04 19:48:51 +03:00
1 parent b030249340
commit f7d08adb03
5 files changed
+11 -4

No files matched your search

+7
View File
@@ -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")
}