golangci-lint: iface: ignore identical interfaces in client module

These interfaces in the client module are identical by design to allow
future expansion.

    client/container_export.go:15:6: identical: interface 'ContainerExportResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerLogsResult, ImageImportResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ContainerExportResult interface {
         ^
    client/container_logs.go:26:6: identical: interface 'ContainerLogsResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ImageImportResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ContainerLogsResult interface {
         ^
    client/image_import.go:12:6: identical: interface 'ImageImportResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ImageImportResult interface {
         ^
    client/image_load.go:12:6: identical: interface 'ImageLoadResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageSaveResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ImageLoadResult interface {
         ^
    client/image_pull.go:17:6: identical: interface 'ImagePullResponse' contains identical methods or type constraints with another interface, causing redundancy (see: ImagePushResponse) (iface)
    type ImagePullResponse interface {
         ^
    client/image_push.go:20:6: identical: interface 'ImagePushResponse' contains identical methods or type constraints with another interface, causing redundancy (see: ImagePullResponse) (iface)
    type ImagePushResponse interface {
         ^
    client/image_save.go:9:6: identical: interface 'ImageSaveResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageLoadResult, ServiceLogsResult, TaskLogsResult) (iface)
    type ImageSaveResult interface {
         ^
    client/service_logs.go:28:6: identical: interface 'ServiceLogsResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageLoadResult, ImageSaveResult, TaskLogsResult) (iface)
    type ServiceLogsResult interface {
         ^
    client/task_logs.go:26:6: identical: interface 'TaskLogsResult' contains identical methods or type constraints with another interface, causing redundancy (see: ContainerExportResult, ContainerLogsResult, ImageImportResult, ImageLoadResult, ImageSaveResult, ServiceLogsResult) (iface)
    type TaskLogsResult interface {
         ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-12-18 15:54:53 +01:00
parent 7b74376ff1
commit 9ae239e654

View File

@@ -343,6 +343,11 @@ linters:
linters:
- forbidigo
# These interfaces in the client module are identical by design to allow future expansion.
- text: "^identical: interface '(ContainerExportResult|ContainerLogsResult|ImagePullResponse|ImagePushResponse|ImageImportResult|ImageLoadResult|ImageSaveResult|ServiceLogsResult|TaskLogsResult)'"
linters:
- iface
# Log a warning if an exclusion rule is unused.
# Default: false
warn-unused: true