🎇 md5 and filename
This commit is contained in:
@ -105,4 +105,12 @@ func Dir(path string) string {
|
||||
return path
|
||||
}
|
||||
return path[:idx]
|
||||
}
|
||||
|
||||
func Base(path string) string {
|
||||
idx := strings.LastIndex(path, "/")
|
||||
if idx == -1 {
|
||||
return path
|
||||
}
|
||||
return path[idx+1:]
|
||||
}
|
Reference in New Issue
Block a user