DockerCLI/cli
Sebastiaan van Stijn c2f3e171b5
cli/command/system/newClientVersion: initialize with default API version
Set the APIVersion and DefaultAPIVersion fields to the default version,
as that's the version the client assumes without making a API connection
to do version negotiation.

One change worth mentioning is that this means that the API version will
differ, depending on the format:

If no server information is fetched:

    docker info --format='{{ json .ClientInfo }}' | jq .ApiVersion
    "1.44"

If server information is fetched:

    docker info --format='{{ json .}}' | jq .ClientInfo.ApiVersion
    "1.43"

An alternative could be to leave the ApiVersion field empty if no
negotiation took place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-23 23:02:50 +01:00
..
command cli/command/system/newClientVersion: initialize with default API version 2023-11-23 23:02:50 +01:00
compose golangci-lint: revive: enable use-any 2023-11-20 19:52:46 +01:00
config golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00
connhelper golangci-lint: enable more linters 2023-11-20 19:52:46 +01:00
context golangci-lint: revive: enable use-any 2023-11-20 19:52:46 +01:00
debug
flags
hints
manifest linting: address assorted issues found by gocritic 2023-11-20 16:02:16 +01:00
registry/client migrate reference github.com/distribution/reference 2023-09-05 17:53:20 +02:00
streams
trust golangci-lint: enable dupword linter 2023-11-20 16:02:18 +01:00
version
winresources
cobra.go
cobra_test.go
error.go
required.go
required_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00