Skip to content

Commit

Permalink
Refactor names
Browse files Browse the repository at this point in the history
  • Loading branch information
donce committed Jan 25, 2018
1 parent 9396c0c commit b68fdb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/mysterium_client/cli/command.go
Expand Up @@ -210,7 +210,7 @@ func (c *Command) status() {
}

func (c *Command) ip() {
ip, err := c.tequilapi.Ip()
ip, err := c.tequilapi.GetIP()
if err != nil {
warn(err)
return
Expand Down
6 changes: 3 additions & 3 deletions tequilapi/client/client.go
Expand Up @@ -110,18 +110,18 @@ func (client *Client) Status() (status StatusDto, err error) {
return status, err
}

func (client *Client) Ip() (string, error) {
func (client *Client) GetIP() (string, error) {
response, err := client.http.Get("ip", url.Values{})
if err != nil {
return "", err
}
defer response.Body.Close()

var ipData struct {
Ip string `json:"ip"`
IP string `json:"ip"`
}
err = parseResponseJson(response, &ipData)
return ipData.Ip, nil
return ipData.IP, nil
}

func (client *Client) Unlock(identity, passphrase string) error {
Expand Down

0 comments on commit b68fdb3

Please sign in to comment.