Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

NetworkInspectWithRaw returns no corresponding types.NetworkResource and []byte ! #292

@allencloud

Description

@allencloud

Hi, All,

Today, I found that docker network inspect NETWORK shows engine details when this command is against Swarm.

See docker-archive/classicswarm#2349 and docker-archive/classicswarm#2275

In the response of NetworkInspectWithRaw from Swarm, there is additional Engine field in it. And dockercli implemented by github.com/spf13/cobra takes []byte to format the output.
If the initial purpose of NetworkInspectWithRaw, is it []byte should be exactly correspond to types.NetworkResource.

func (cli *Client) NetworkInspectWithRaw(ctx context.Context, networkID string) (types.NetworkResource, []byte, error)

If the answer is yes, I think we should fix this. Maybe I can do the change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions