aboutsummaryrefslogtreecommitdiffhomepage
path: root/container
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-14 05:00:09 +0900
committerOphestra <cat@gensokyo.uk>2025-08-14 05:00:09 +0900
commit332d90d6c77ff6c8204f84e5213f8a1f9dc44745 (patch)
tree1bf586d823b5b628c7f398144aa5588a1a55e193 /container
parent99ac96511bed17f48d908db3d00a1f48579ba011 (diff)
container/path: remove unused path
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container')
-rw-r--r--container/absolute_test.go9
-rw-r--r--container/path.go3
2 files changed, 9 insertions, 3 deletions
diff --git a/container/absolute_test.go b/container/absolute_test.go
index 014ace81..b3682516 100644
--- a/container/absolute_test.go
+++ b/container/absolute_test.go
@@ -113,6 +113,10 @@ func TestCodecAbsolute(t *testing.T) {
gob, sGob string
json, sJson string
}{
+ {"nil", nil, nil,
+ "\x00", "\x00",
+ `null`, `{"val":null,"magic":3236757504}`},
+
{"good", MustAbs("/etc"),
nil,
"\t\x7f\x05\x01\x02\xff\x82\x00\x00\x00\b\xff\x80\x00\x04/etc",
@@ -135,6 +139,11 @@ func TestCodecAbsolute(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
t.Run("gob", func(t *testing.T) {
+ if tc.gob == "\x00" && tc.sGob == "\x00" {
+ // these values mark the current test to skip gob
+ return
+ }
+
t.Run("encode", func(t *testing.T) {
// encode is unchecked
if errors.Is(tc.wantErr, syscall.EINVAL) {
diff --git a/container/path.go b/container/path.go
index fe6d6d4c..a8d44b1d 100644
--- a/container/path.go
+++ b/container/path.go
@@ -78,9 +78,6 @@ var (
AbsFHSProc = &Absolute{FHSProc}
// AbsFHSSys is [FHSSys] as [Absolute].
AbsFHSSys = &Absolute{FHSSys}
-
- // AbsNonexistent is [Nonexistent] as [Absolute].
- AbsNonexistent = &Absolute{Nonexistent}
)
const (