It was only used in a single place, and possibly incorrect. Let's inline
it to put the logic where it's used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These are very small structs, so using pointers doesn't bring much
advantage and makes it slightly more cumbersome to use.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This intermediate slice was a left-over from the "Compose on Kubernetes"
feature, which required some conversions, but that code was removed in
193ede9b12, so the intermediate slice no
longer has a purpose.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Preserve the original order by avoiding the intermediate map[string] and
keeping an index for the first occurrence of a stack; this also avoids
looping multiple times.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Include name in test-table
- Don't use un-keyed values in struct
- Simplify test-table to take a format string instead of a whole formatter.Context
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Functions and types in this package were exported as part of the "compose
on kubernetes" feature, which was deprecated and removed. These functions
are meant for internal use, and will be removed in the next release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Functions and types in this package were exported as part of the "compose
on kubernetes" feature, which was deprecated and removed. These functions
are meant for internal use, and will be removed in the next release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Functions and types in this package were exported as part of the "compose
on kubernetes" feature, which was deprecated and removed. These functions
are meant for internal use, and will be removed in the next release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Functions and types in this package were exported as part of the "compose
on kubernetes" feature, which was deprecated and removed. These functions
are meant for internal use, and will be removed in the next release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Functions and types in this package were exported as part of the "compose
on kubernetes" feature, which was deprecated and removed. These functions
are meant for internal use, and will be removed in the next release.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This only impacts the JSON marshaled output; the "regular" output
of `docker info` already ignores these fields.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These were just testing JSON marshaling fields that are deprecated, but
may be present in a response; these fields will be removed in future
API versions, so stop testing for them.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This special handling was added in [moby@9b6dcc8], and later updated in
[moby@c127d96], but it fully depended on string-matching, which is brittle.
Testing the original ticket that lead to this handling, it looks like the
string matching no longer works, and the daemon error is returned as-is:
With graphdrivers:
docker pull tiborvass/no-remove
Using default tag: latest
Error response from daemon: Encountered remote "application/vnd.docker.plugin.v0+json"(unknown) when fetching
With containerd snapshotters enabled:
docker pull tiborvass/no-remove
Using default tag: latest
latest: Pulling from tiborvass/no-remove
cf635291f7c9: Download complete
failed to unpack image on snapshotter overlayfs: mismatched image rootfs and manifest layers
The error-message for containerd can probably be improved, but as the special
handling in the CLI no longer works, we can remove it.
[moby@9b6dcc8]: 9b6dcc8b9d
[moby@c127d96]: c127d9614f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This function was used to share it between "trust" and "image",
but was only a shallow wrapper, so split the implementations where
used.
It was deprecated in 7ad113ccc2 and is
no longer used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Now that 3f5b1bdd32 removed DCT, which
needed some of the intermediate types (indexInfo), we can simplify the
auth code further and just get the base64-encoded AuthConfig to be set
as header.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These were deprecated in a5f4ba08d9 and only
used internally.
This removes the deprecated types and functions:
- `RunConfigCreate` and `CreateOptions`
- `RunConfigInspect` and `InspectOptions`
- `RunConfigList` and `ListOptions`
- `RunConfigRemove` and `RemoveOptions`
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These were exported in f60369dfe6 to be
used in docker enterprise, but this never happened, and there's no
known consumers of these, so we should deprecate these. External
consumers can still call the API-client directly, which should've
been the correct thing to do in the first place.
This deprecates:
- `RunConfigCreate` and `CreateOptions`
- `RunConfigInspect` and `InspectOptions`
- `RunConfigList` and `ListOptions`
- `RunConfigRemove` and `RemoveOptions`
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These flags were added in 20a6ff32ee, and require
API version v1.32 or up, but they accidentally copied the flag-name from another
flag, so were not setting the annotation correctly.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Remove redundant intermediate variables
- Explicitly use an early return on error instead of combining with
other checks.
- Fix unhandled errors and combine defers
- Remove outstanding TODO that unlikely will be addressed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The `reference.TrimNamed` function strips both digests and tags; the
formatter function only wants to remove the digest, but preserve any
tags present.
Update the implementation to only trim the reference if there's a digest
present, otherwise use it as-is.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This function was exported to share it between "trust" and "image",
but was only a shallow wrapper, so split the implementations where
used.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>