Commit 7fc2305
committed
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>1 parent e1c30df commit 7fc2305
1 file changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| |||
0 commit comments