Files
list-version/util/hash.go
T
2024-08-30 09:15:24 +08:00

14 lines
179 B
Go

package util
import (
"crypto/md5"
"fmt"
"io"
)
func ToHashHex(filePath string) string {
h := md5.New()
io.WriteString(h, filePath)
return fmt.Sprintf("%x", h.Sum(nil))
}