Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Antonin Bas <antonin.bas@gmail.com>
  • Loading branch information
weiqiangt and antoninbas authored Jan 15, 2020
1 parent cb6da3d commit ba4bbe0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/antctl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ func (c *client) resolveKubeconfig(opt *RequestOption) (*rest.Config, error) {
return kubeconfig, nil
}

// localRequest issues the local request according to the RequestOption. It only cares
// localRequest issues the local request according to the RequestOption. It only cares about
// the groupVersion of the RequestOption which will be used to construct the request
// URI. localRequest is basically a raw http request, none authentication and authorization
// URI. localRequest is basically a raw http request, no authentication and authorization
// will be done during the request. For safety concerns, it communicates with the
// antctl server by a predefined unix domain socket. If the request succeeds, it
// will return an io.Reader which contains the response data.
Expand Down Expand Up @@ -102,10 +102,10 @@ func (c *client) localRequest(opt *RequestOption) (io.Reader, error) {
}

// Request issues the appropriate request to the antctl server according to the
// request options. If the inPod filed of the client is true, the client will do
// request options. If the inPod field of the client is true, the client will do
// a local request by invoking localRequest. Otherwise, it will check the kubeconfig
// and request the antctl server by the delegation of the kubernetes API server.
// If the request succeeded, it will returns an io.Reader which contains the response
// and delegate the request destined to the antctl server to the kubernetes API server.
// If the request succeeds, it will return an io.Reader which contains the response
// data.
func (c *client) Request(opt *RequestOption) (io.Reader, error) {
if c.inPod {
Expand Down
2 changes: 1 addition & 1 deletion pkg/antctl/handlers/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var _ Factory = new(Version)
// command. It contains the version of the component the antctl server is running
// in, either the agent or the controller.
// This struct is not the final response struct of the version command. The version
// command definition has a AddonTransform which will populate this struct and the
// command definition has an AddonTransform which will populate this struct and the
// version of antctl client to the final response.
type ComponentVersionResponse struct {
AgentVersion string `json:"agentVersion,omitempty" yaml:"agentVersion,omitempty"`
Expand Down

0 comments on commit ba4bbe0

Please sign in to comment.