aboutsummaryrefslogtreecommitdiffhomepage
path: root/vfs/mangle.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-03 02:59:43 +0900
committerOphestra <cat@gensokyo.uk>2025-07-03 02:59:43 +0900
commit1b5ecd9eaf3289d164d8ed1bce6013e0e4ef8e86 (patch)
tree047fe5fabdfb37d5c0088f7f572cebc8b13853bb /vfs/mangle.go
parent82561d62b66f17c05604e87f18187bb3a91f00d2 (diff)
container: move out of toplevel
This allows slightly easier use of the vanity url. This also provides some disambiguation between low level containers and hakurei app containers. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'vfs/mangle.go')
-rw-r--r--vfs/mangle.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/vfs/mangle.go b/vfs/mangle.go
deleted file mode 100644
index 83aba589..00000000
--- a/vfs/mangle.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package vfs
-
-import "strings"
-
-func Unmangle(s string) string {
- if !strings.ContainsRune(s, '\\') {
- return s
- }
-
- v := make([]byte, len(s))
- var (
- j int
- c byte
- )
- for i := 0; i < len(s); i++ {
- c = s[i]
- if c == '\\' && len(s) > i+3 &&
- (s[i+1] == '0' || s[i+1] == '1') &&
- (s[i+2] >= '0' && s[i+2] <= '7') &&
- (s[i+3] >= '0' && s[i+3] <= '7') {
- c = ((s[i+1] - '0') << 6) |
- ((s[i+2] - '0') << 3) |
- (s[i+3] - '0')
- i += 3
- }
- v[j] = c
- j++
- }
- return string(v[:j])
-}