Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit f271189

Browse files
committed
use all-caps acronyms in vars, as per Go convention
1 parent 4cd08a2 commit f271189

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

org_users.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ type OrgUser struct {
1616
}
1717

1818
// OrgUsers fetches and returns the users for the org whose ID it's passed.
19-
func (c *Client) OrgUsers(orgId int64) ([]OrgUser, error) {
19+
func (c *Client) OrgUsers(orgID int64) ([]OrgUser, error) {
2020
users := make([]OrgUser, 0)
21-
err := c.request("GET", fmt.Sprintf("/api/orgs/%d/users", orgId), nil, nil, &users)
21+
err := c.request("GET", fmt.Sprintf("/api/orgs/%d/users", orgID), nil, nil, &users)
2222
if err != nil {
2323
return users, err
2424
}
@@ -27,7 +27,7 @@ func (c *Client) OrgUsers(orgId int64) ([]OrgUser, error) {
2727
}
2828

2929
// AddOrgUser adds a user to an org with the specified role.
30-
func (c *Client) AddOrgUser(orgId int64, user, role string) error {
30+
func (c *Client) AddOrgUser(orgID int64, user, role string) error {
3131
dataMap := map[string]string{
3232
"loginOrEmail": user,
3333
"role": role,
@@ -37,11 +37,11 @@ func (c *Client) AddOrgUser(orgId int64, user, role string) error {
3737
return err
3838
}
3939

40-
return c.request("POST", fmt.Sprintf("/api/orgs/%d/users", orgId), nil, bytes.NewBuffer(data), nil)
40+
return c.request("POST", fmt.Sprintf("/api/orgs/%d/users", orgID), nil, bytes.NewBuffer(data), nil)
4141
}
4242

4343
// UpdateOrgUser updates and org user.
44-
func (c *Client) UpdateOrgUser(orgId, userId int64, role string) error {
44+
func (c *Client) UpdateOrgUser(orgID, userID int64, role string) error {
4545
dataMap := map[string]string{
4646
"role": role,
4747
}
@@ -50,10 +50,10 @@ func (c *Client) UpdateOrgUser(orgId, userId int64, role string) error {
5050
return err
5151
}
5252

53-
return c.request("PATCH", fmt.Sprintf("/api/orgs/%d/users/%d", orgId, userId), nil, bytes.NewBuffer(data), nil)
53+
return c.request("PATCH", fmt.Sprintf("/api/orgs/%d/users/%d", orgID, userID), nil, bytes.NewBuffer(data), nil)
5454
}
5555

5656
// RemoveOrgUser removes a user from an org.
57-
func (c *Client) RemoveOrgUser(orgId, userId int64) error {
58-
return c.request("DELETE", fmt.Sprintf("/api/orgs/%d/users/%d", orgId, userId), nil, nil, nil)
57+
func (c *Client) RemoveOrgUser(orgID, userID int64) error {
58+
return c.request("DELETE", fmt.Sprintf("/api/orgs/%d/users/%d", orgID, userID), nil, nil, nil)
5959
}

0 commit comments

Comments
 (0)