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

Commit 167efc7

Browse files
committed
Make email field omitempty for compatibility
Newer instances of auth which do not include an email should not serialize the key, but existing values should not be stripped on serialization. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
1 parent 26a3054 commit 167efc7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎types/auth.go‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ package types
22

33
// AuthConfig contains authorization information for connecting to a Registry
44
type AuthConfig struct {
5-
Username string `json:"username,omitempty"`
6-
Password string `json:"password,omitempty"`
7-
Auth string `json:"auth,omitempty"`
5+
Username string `json:"username,omitempty"`
6+
Password string `json:"password,omitempty"`
7+
Auth string `json:"auth,omitempty"`
8+
9+
// Email is an optional value associated with the username.
10+
// This field is deprecated and will be removed in a later
11+
// version of docker.
12+
Email string `json:"email,omitempty"`
13+
814
ServerAddress string `json:"serveraddress,omitempty"`
915
RegistryToken string `json:"registrytoken,omitempty"`
1016
}

0 commit comments

Comments
 (0)