Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gofmt all source files #124

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contact.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type ContactService struct {

// ContactList holds a list of Contacts and paging information
type ContactList struct {
Pages PageParams
Contacts []Contact
Pages PageParams
Contacts []Contact
ScrollParam string `json:"scroll_param,omitempty"`
}

Expand Down Expand Up @@ -69,7 +69,7 @@ func (c *ContactService) List(params PageParams) (ContactList, error) {

// List all Contacts for App via Scroll API
func (c *ContactService) Scroll(scrollParam string) (ContactList, error) {
return c.Repository.scroll(scrollParam)
return c.Repository.scroll(scrollParam)
}

// ListByEmail looks up a list of Contacts by their Email.
Expand Down
16 changes: 8 additions & 8 deletions contact_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ func (api ContactAPI) list(params contactListParams) (ContactList, error) {
}

func (api ContactAPI) scroll(scrollParam string) (ContactList, error) {
contactList := ContactList{}
params := scrollParams{ ScrollParam: scrollParam }
data, err := api.httpClient.Get("/contacts/scroll", params)
if err != nil {
return contactList, err
}
err = json.Unmarshal(data, &contactList)
return contactList, err
contactList := ContactList{}
params := scrollParams{ScrollParam: scrollParam}
data, err := api.httpClient.Get("/contacts/scroll", params)
if err != nil {
return contactList, err
}
err = json.Unmarshal(data, &contactList)
return contactList, err
}

func (api ContactAPI) create(contact *Contact) (Contact, error) {
Expand Down
10 changes: 5 additions & 5 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type UserService struct {

// UserList holds a list of Users and paging information
type UserList struct {
Pages PageParams
Users []User
Pages PageParams
Users []User
ScrollParam string `json:"scroll_param,omitempty"`
}

Expand Down Expand Up @@ -81,7 +81,7 @@ type UserIdentifiers struct {

// UserAvatar represents an avatar for a User.
type UserAvatar struct {
Type string `json:"type,omitempty"`
Type string `json:"type,omitempty"`
ImageURL string `json:"image_url,omitempty"`
}

Expand All @@ -92,7 +92,7 @@ type userListParams struct {
}

type scrollParams struct {
ScrollParam string `url:"scroll_param,omitempty"`
ScrollParam string `url:"scroll_param,omitempty"`
}

// FindByID looks up a User by their Intercom ID.
Expand Down Expand Up @@ -121,7 +121,7 @@ func (u *UserService) List(params PageParams) (UserList, error) {

// List all Users for App via Scroll API
func (u *UserService) Scroll(scrollParam string) (UserList, error) {
return u.Repository.scroll(scrollParam)
return u.Repository.scroll(scrollParam)
}

// List Users by Segment.
Expand Down
20 changes: 10 additions & 10 deletions user_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type UserAPI struct {
}

type requestScroll struct {
ScrollParam string `json:"scroll_param,omitempty"`
ScrollParam string `json:"scroll_param,omitempty"`
}
type requestUser struct {
ID string `json:"id,omitempty"`
Expand Down Expand Up @@ -68,17 +68,17 @@ func (api UserAPI) list(params userListParams) (UserList, error) {
}

func (api UserAPI) scroll(scrollParam string) (UserList, error) {
userList := UserList{}
userList := UserList{}

url := "/users/scroll"
params := scrollParams{ ScrollParam: scrollParam }
data, err := api.httpClient.Get(url, params)
url := "/users/scroll"
params := scrollParams{ScrollParam: scrollParam}
data, err := api.httpClient.Get(url, params)

if err != nil {
return userList, err
}
err = json.Unmarshal(data, &userList)
return userList, err
if err != nil {
return userList, err
}
err = json.Unmarshal(data, &userList)
return userList, err
}

func (api UserAPI) save(user *User) (User, error) {
Expand Down