mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Rename PortainerClient.GetStatus() to Status()
This commit is contained in:
parent
aa606782af
commit
f38481b008
@ -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
|
||||
}
|
||||
|
@ -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") {
|
||||
|
Loading…
Reference in New Issue
Block a user