mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-02 22:30:22 +00:00
util: Provide AppendBackupSuffix() for further transformations
This commit is contained in:
parent
1663a1a6e4
commit
21b7080935
1 changed files with 4 additions and 0 deletions
|
|
@ -412,6 +412,10 @@ func GetModTime(path string) (time.Time, error) {
|
|||
return info.ModTime(), nil
|
||||
}
|
||||
|
||||
func AppendBackupSuffix(path string) string {
|
||||
return path + ".micro-backup"
|
||||
}
|
||||
|
||||
// EscapePathUrl encodes the path in URL query form
|
||||
func EscapePathUrl(path string) string {
|
||||
return url.QueryEscape(filepath.ToSlash(path))
|
||||
|
|
|
|||
Loading…
Reference in a new issue