From cfb55e7b461cc8dd58d7f64651e496fb6dfa7914 Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Sat, 15 Apr 2017 04:23:36 +0900 Subject: [PATCH] Fix method string to const --- instance.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instance.go b/instance.go index 60e82dc..20be51f 100644 --- a/instance.go +++ b/instance.go @@ -1,5 +1,7 @@ package mastodon +import "net/http" + // Instance hold information for mastodon instance. type Instance struct { URI string `json:"uri"` @@ -11,7 +13,7 @@ type Instance struct { // GetInstance return Instance. func (c *Client) GetInstance() (*Instance, error) { var instance Instance - err := c.doAPI("GET", "/api/v1/instance", nil, &instance) + err := c.doAPI(http.MethodGet, "/api/v1/instance", nil, &instance) if err != nil { return nil, err }