diff --git a/gogoose.go b/gogoose.go index ffefccf..ea27561 100644 --- a/gogoose.go +++ b/gogoose.go @@ -7,15 +7,15 @@ import ( ) type GooseClient struct { - url string + Url string } func New(localHostUrl string) *GooseClient { - return &GooseClient{url: localHostUrl} + return &GooseClient{Url: localHostUrl} } func (gc *GooseClient) All() (*http.Response, error) { - resp, err := http.Get(gc.url + "all") + resp, err := http.Get(gc.Url + "all") if err != nil { return nil, err } @@ -28,7 +28,7 @@ func (gc *GooseClient) Send(jsonData interface{}) (*http.Response, error) { return nil, err } - resp, err := http.Post(gc.url+"send", "application/json", bytes.NewBuffer(jsonBytes)) + resp, err := http.Post(gc.Url+"send", "application/json", bytes.NewBuffer(jsonBytes)) if err != nil { return nil, err } @@ -42,7 +42,7 @@ func (gc *GooseClient) Update(jsonData interface{}) (*http.Response, error) { return nil, err } - resp, err := http.Post(gc.url+"update", "application/json", bytes.NewBuffer(jsonBytes)) + resp, err := http.Post(gc.Url+"update", "application/json", bytes.NewBuffer(jsonBytes)) if err != nil { return nil, err } @@ -56,7 +56,7 @@ func (gc *GooseClient) Delete(jsonData interface{}) (*http.Response, error) { return nil, err } - resp, err := http.Post(gc.url+"delete", "application/json", bytes.NewBuffer(jsonBytes)) + resp, err := http.Post(gc.Url+"delete", "application/json", bytes.NewBuffer(jsonBytes)) if err != nil { return nil, err }