diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-17 13:53:14 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-17 13:53:14 +0900 |
| commit | 0cb1007daaea2b8f6b28bff72aa5d08aea981ea9 (patch) | |
| tree | 9950dcdaaaf67bdd937c83855dd6401e35012d6e /ldd/exec.go | |
| parent | e292031624b7fe57d508476828e51ca66d520bcb (diff) | |
ldd: remove deprecated API
Closes #25.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'ldd/exec.go')
| -rw-r--r-- | ldd/exec.go | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/ldd/exec.go b/ldd/exec.go index c0b40655..7392bd8b 100644 --- a/ldd/exec.go +++ b/ldd/exec.go @@ -18,14 +18,17 @@ import ( ) const ( - // msgStaticSuffix is the suffix of message printed to stderr by musl on a statically linked program. + // msgStaticSuffix is the suffix of message printed to stderr by musl on a + // statically linked program. msgStaticSuffix = ": Not a valid dynamic program" - // msgStaticGlibc is a substring of the message printed to stderr by glibc on a statically linked program. + // msgStaticGlibc is a substring of the message printed to stderr by glibc + // on a statically linked program. msgStaticGlibc = "not a dynamic executable" // lddName is the file name of ldd(1) passed to exec.LookPath. lddName = "ldd" - // lddTimeout is the maximum duration ldd(1) is allowed to ran for before it is terminated. + // lddTimeout is the maximum duration ldd(1) is allowed to ran for before it + // is terminated. lddTimeout = 4 * time.Second ) @@ -104,15 +107,3 @@ func Resolve( } return entries, decodeErr } - -// Exec runs ldd(1) in a restrictive [container] and connects it to a [Decoder], returning resulting entries. -// -// Deprecated: this function takes an unchecked pathname string. -// Relative pathnames do not work in the container as working directory information is not sent. -func Exec(ctx context.Context, msg message.Msg, pathname string) ([]*Entry, error) { - if a, err := check.NewAbs(pathname); err != nil { - return nil, err - } else { - return Resolve(ctx, msg, a) - } -} |
