diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-09 18:55:06 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-09 18:55:06 +0200 |
commit | bea4f87f1e4528630d326699a9c7fd6133ee7806 (patch) | |
tree | 49bff8fed5e9e1a7d4546ad41454e6ee07f6fa25 /utils/fileutils.go | |
parent | 3e866db2accc6ed5aa65befdf21474dbc7b1ec18 (diff) | |
download | dna-backup-bea4f87f1e4528630d326699a9c7fd6133ee7806.tar.gz dna-backup-bea4f87f1e4528630d326699a9c7fd6133ee7806.zip |
better commit and restore tests (almost complete)
added some file path management function for prfixes and trailing slash
Diffstat (limited to 'utils/fileutils.go')
-rw-r--r-- | utils/fileutils.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/fileutils.go b/utils/fileutils.go new file mode 100644 index 0000000..6c269ca --- /dev/null +++ b/utils/fileutils.go @@ -0,0 +1,10 @@ +package utils + +import ( + "path/filepath" + "strings" +) + +func TrimTrailingSeparator(path string) string { + return strings.TrimSuffix(path, string(filepath.Separator)) +} |