From 332d90d6c77ff6c8204f84e5213f8a1f9dc44745 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 14 Aug 2025 05:00:09 +0900 Subject: [PATCH] container/path: remove unused path Signed-off-by: Ophestra --- container/absolute_test.go | 9 +++++++++ container/path.go | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/container/absolute_test.go b/container/absolute_test.go index 014ace8..b368251 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 fe6d6d4..a8d44b1 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 (