Files
Andrey Smirnov ea945443ac fix: hide go-cmp library from the non-test code path
The `go-cmp` library has issues with Go deadcode elimination:

```
github.com/google/go-cmp/cmp/internal/value.appendTypeName reachable from:
         github.com/google/go-cmp/cmp.pathStep.String
         type:github.com/google/go-cmp/cmp.pathStep
         type:github.com/google/go-cmp/cmp.structField
         type:*github.com/google/go-cmp/cmp.structField
         type:github.com/google/go-cmp/cmp.StructField
         go:itab.github.com/google/go-cmp/cmp.StructField,github.com/google/go-cmp/cmp.PathStep
         github.com/google/go-cmp/cmp.Path.String
         type:github.com/google/go-cmp/cmp.Path
         type:github.com/google/go-cmp/cmp.state
         type:*github.com/google/go-cmp/cmp.state
         type:func(*github.com/google/go-cmp/cmp.state, reflect.Type, reflect.Value, reflect.Value) github.com/google/go-cmp/cmp.applicableOption
         type:github.com/google/go-cmp/cmp.Option
         github.com/google/go-cmp/cmp.flattenOptions
         github.com/google/go-cmp/cmp.normalizeOption
         github.com/google/go-cmp/cmp.FilterValues
         github.com/containerd/containerd/v2/pkg/protobuf.init
         github.com/containerd/containerd/v2/pkg/protobuf..inittask
         go:main.inittasks
```

The `pkg/protobuf` is imported unconditionally is
`github.com/containerd/containerd` Go module is imported via init tasks,
so there is no way e.g. to use containerd client without triggering this
import.

It seems that within containerd itself this function is only used from
tests, so hiding it this way allows to import `containerd/client` while
keeping deadcode elimination.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2026-03-17 11:46:12 +04:00
..
2024-10-26 14:18:53 +02:00
2024-10-26 14:18:53 +02:00
2024-05-02 10:52:03 -07:00