aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/check/overlay.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/check/overlay.go')
-rw-r--r--container/check/overlay.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/container/check/overlay.go b/container/check/overlay.go
deleted file mode 100644
index fbbcd1e6..00000000
--- a/container/check/overlay.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package check
-
-import "strings"
-
-const (
- // SpecialOverlayEscape is the escape string for overlay mount options.
- SpecialOverlayEscape = `\`
- // SpecialOverlayOption is the separator string between overlay mount options.
- SpecialOverlayOption = ","
- // SpecialOverlayPath is the separator string between overlay paths.
- SpecialOverlayPath = ":"
-)
-
-// EscapeOverlayDataSegment escapes a string for formatting into the data
-// argument of an overlay mount system call.
-func EscapeOverlayDataSegment(s string) string {
- if s == "" {
- return ""
- }
-
- if f := strings.SplitN(s, "\x00", 2); len(f) > 0 {
- s = f[0]
- }
-
- return strings.NewReplacer(
- SpecialOverlayEscape, SpecialOverlayEscape+SpecialOverlayEscape,
- SpecialOverlayOption, SpecialOverlayEscape+SpecialOverlayOption,
- SpecialOverlayPath, SpecialOverlayEscape+SpecialOverlayPath,
- ).Replace(s)
-}