Rename PortainerClient.GetStatus() to Status()

This commit is contained in:
Juan Carlos Mejías Rodríguez 2019-08-26 01:29:21 -04:00
parent aa606782af
commit f38481b008
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ type PortainerClient interface {
EndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error)
// Get Portainer status info
GetStatus() (portainer.Status, error)
Status() (portainer.Status, error)
// Run a function before sending a request to Portainer
BeforeRequest(hook func(req *http.Request) (err error))
@ -301,7 +301,7 @@ func (n *portainerClientImp) EndpointDockerInfo(endpointID portainer.EndpointID)
return
}
func (n *portainerClientImp) GetStatus() (status portainer.Status, err error) {
func (n *portainerClientImp) Status() (status portainer.Status, err error) {
err = n.doJSONWithToken("status", http.MethodGet, http.Header{}, nil, &status)
return
}

View File

@ -26,7 +26,7 @@ var statusCmd = &cobra.Command{
client, err := common.GetClient()
common.CheckError(err)
respBody, err := client.GetStatus()
respBody, err := client.Status()
common.CheckError(err)
switch viper.GetString("status.format") {