aboutsummaryrefslogtreecommitdiffhomepage
path: root/helper/bwrap/arg.static.int.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-01-15 10:57:10 +0900
committerOphestra <cat@gensokyo.uk>2025-01-15 13:07:06 +0900
commit3e11ce6868182f1a3f74d5bf6c1db761097666fa (patch)
tree85c611acc2aadb5b5b7818ad5a6a0769a6d71fa4 /helper/bwrap/arg.static.int.go
parent562f5ed7971603a4e4e3315a7fe4188153bfc205 (diff)
helper/bwrap: separate sequential/static args
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper/bwrap/arg.static.int.go')
-rw-r--r--helper/bwrap/arg.static.int.go47
1 files changed, 0 insertions, 47 deletions
diff --git a/helper/bwrap/arg.static.int.go b/helper/bwrap/arg.static.int.go
deleted file mode 100644
index cba3b1f7..00000000
--- a/helper/bwrap/arg.static.int.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package bwrap
-
-import "strconv"
-
-const (
- UID = iota
- GID
- Perms
- Size
-)
-
-var intArgs = [...]string{
- UID: "--uid",
- GID: "--gid",
- Perms: "--perms",
- Size: "--size",
-}
-
-func (c *Config) intArgs() Builder {
- // Arg types:
- // Perms
- // are handled by the sequential builder
-
- return &intArg{
- UID: c.UID,
- GID: c.GID,
- }
-}
-
-type intArg [len(intArgs)]*int
-
-func (n *intArg) Len() (l int) {
- for _, v := range n {
- if v != nil {
- l += 2
- }
- }
- return
-}
-
-func (n *intArg) Append(args *[]string) {
- for i, v := range n {
- if v != nil {
- *args = append(*args, intArgs[i], strconv.Itoa(*v))
- }
- }
-}