mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
Merge branch 'main' into v2
This commit is contained in:
@@ -402,7 +402,7 @@ func MTime(filepath string) (int64, error) {
|
|||||||
return f.ModTime().Unix(), nil
|
return f.ModTime().Unix(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MTime returns file sha value, param `shaType` should be 1, 256 or 512.
|
// Sha returns file sha value, param `shaType` should be 1, 256 or 512.
|
||||||
// Play: https://go.dev/play/p/VfEEcO2MJYf
|
// Play: https://go.dev/play/p/VfEEcO2MJYf
|
||||||
func Sha(filepath string, shaType ...int) (string, error) {
|
func Sha(filepath string, shaType ...int) (string, error) {
|
||||||
file, err := os.Open(filepath)
|
file, err := os.Open(filepath)
|
||||||
|
|||||||
Reference in New Issue
Block a user