Skip to content

Commit

Permalink
url -> Url
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinmay Chaudhari authored and Chinmay Chaudhari committed Oct 21, 2023
1 parent 6478ae8 commit 1693525
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gogoose.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 1693525

Please sign in to comment.