summaryrefslogtreecommitdiffstats
path: root/common/paths
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-12-30 09:20:58 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-01-04 18:01:26 +0100
commite402d91ee199afcace8ae75da6c3587bb8089ace (patch)
treea0f51de9707ed03aa1a3d7a9195fd9d0fceab108 /common/paths
parent3c51625c7152abca7e035fae15fc6807ca21cc86 (diff)
Misc doc, code refactoring to improve documentation
Diffstat (limited to 'common/paths')
-rw-r--r--common/paths/path.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/paths/path.go b/common/paths/path.go
index 3a7f3e790..11d221bb1 100644
--- a/common/paths/path.go
+++ b/common/paths/path.go
@@ -263,3 +263,14 @@ func (n NamedSlice) String() string {
}
return fmt.Sprintf("%s%s{%s}", n.Name, FilePathSeparator, strings.Join(n.Slice, ","))
}
+
+// DirFile holds the result from path.Split.
+type DirFile struct {
+ Dir string
+ File string
+}
+
+// Used in test.
+func (df DirFile) String() string {
+ return fmt.Sprintf("%s|%s", df.Dir, df.File)
+}