Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
| ... | ... |
@@ -11,7 +11,7 @@ import ( |
| 11 | 11 |
) |
| 12 | 12 |
|
| 13 | 13 |
// RegistryLogin authenticates the docker server with a given docker registry. |
| 14 |
-// It returns UnauthorizerError when the authentication fails. |
|
| 14 |
+// It returns unauthorizedError when the authentication fails. |
|
| 15 | 15 |
func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error) {
|
| 16 | 16 |
resp, err := cli.post(ctx, "/auth", url.Values{}, auth, nil)
|
| 17 | 17 |
|
| ... | ... |
@@ -31,12 +31,12 @@ func (cli *Client) head(ctx context.Context, path string, query url.Values, head |
| 31 | 31 |
return cli.sendRequest(ctx, "HEAD", path, query, nil, headers) |
| 32 | 32 |
} |
| 33 | 33 |
|
| 34 |
-// getWithContext sends an http request to the docker API using the method GET with a specific go context. |
|
| 34 |
+// get sends an http request to the docker API using the method GET with a specific Go context. |
|
| 35 | 35 |
func (cli *Client) get(ctx context.Context, path string, query url.Values, headers map[string][]string) (serverResponse, error) {
|
| 36 | 36 |
return cli.sendRequest(ctx, "GET", path, query, nil, headers) |
| 37 | 37 |
} |
| 38 | 38 |
|
| 39 |
-// postWithContext sends an http request to the docker API using the method POST with a specific go context. |
|
| 39 |
+// post sends an http request to the docker API using the method POST with a specific Go context. |
|
| 40 | 40 |
func (cli *Client) post(ctx context.Context, path string, query url.Values, obj interface{}, headers map[string][]string) (serverResponse, error) {
|
| 41 | 41 |
body, headers, err := encodeBody(obj, headers) |
| 42 | 42 |
if err != nil {
|
| ... | ... |
@@ -58,7 +58,7 @@ func (cli *Client) put(ctx context.Context, path string, query url.Values, obj i |
| 58 | 58 |
return cli.sendRequest(ctx, "PUT", path, query, body, headers) |
| 59 | 59 |
} |
| 60 | 60 |
|
| 61 |
-// put sends an http request to the docker API using the method PUT. |
|
| 61 |
+// putRaw sends an http request to the docker API using the method PUT. |
|
| 62 | 62 |
func (cli *Client) putRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers map[string][]string) (serverResponse, error) {
|
| 63 | 63 |
return cli.sendRequest(ctx, "PUT", path, query, body, headers) |
| 64 | 64 |
} |