Skip to content

Commit 2ef37ae

Browse files
Format everything with golangci-lint (#830)
* Run golangci-lint fmt * Fix go docs
1 parent 5a81d98 commit 2ef37ae

35 files changed

+52
-50
lines changed

account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (i Account) GetUpdateOptions() (o AccountUpdateOptions) {
6363
o.TaxID = i.TaxID
6464
o.Zip = i.Zip
6565

66-
return
66+
return o
6767
}
6868

6969
// UnmarshalJSON implements the json.Unmarshaler interface

account_agreements.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (i AccountAgreements) GetUpdateOptions() (o AccountAgreementsUpdateOptions)
2222
o.MasterServiceAgreement = i.MasterServiceAgreement
2323
o.PrivacyPolicy = i.PrivacyPolicy
2424

25-
return
25+
return o
2626
}
2727

2828
// GetAccountAgreements gets all agreements and their acceptance status for the Account.

account_betas.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import (
88
"github.com/linode/linodego/internal/parseabletime"
99
)
1010

11-
// The details and enrollment information of a Beta program that an account is enrolled in.
11+
// AccountBetaProgram represents an enrolled Account Beta Program object,
12+
// which contains the details and enrollment information of a Beta program
13+
// that an account is enrolled in.
1214
type AccountBetaProgram struct {
1315
Label string `json:"label"`
1416
ID string `json:"id"`

account_maintenance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type AccountMaintenance struct {
2828
When *time.Time `json:"when"`
2929
}
3030

31-
// The entity being affected by maintenance
31+
// Entity represents the entity being affected by maintenance
3232
type Entity struct {
3333
ID int `json:"id"`
3434
Label string `json:"label"`

account_oauth_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (i OAuthClient) GetCreateOptions() (o OAuthClientCreateOptions) {
6868
o.Label = i.Label
6969
o.Public = i.Public
7070

71-
return
71+
return o
7272
}
7373

7474
// GetUpdateOptions converts a OAuthClient to OAuthClientUpdateOptions for use in UpdateOAuthClient
@@ -77,7 +77,7 @@ func (i OAuthClient) GetUpdateOptions() (o OAuthClientUpdateOptions) {
7777
o.Label = i.Label
7878
o.Public = i.Public
7979

80-
return
80+
return o
8181
}
8282

8383
// ListOAuthClients lists OAuthClients

account_payments.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (i *Payment) UnmarshalJSON(b []byte) error {
5353
// GetCreateOptions converts a Payment to PaymentCreateOptions for use in CreatePayment
5454
func (i Payment) GetCreateOptions() (o PaymentCreateOptions) {
5555
o.USD = i.USD
56-
return
56+
return o
5757
}
5858

5959
// ListPayments lists Payments

account_users.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (i User) GetCreateOptions() (o UserCreateOptions) {
9898
o.Email = i.Email
9999
o.Restricted = i.Restricted
100100

101-
return
101+
return o
102102
}
103103

104104
// GetUpdateOptions converts a User to UserUpdateOptions for use in UpdateUser
@@ -107,7 +107,7 @@ func (i User) GetUpdateOptions() (o UserUpdateOptions) {
107107
o.Restricted = copyBool(&i.Restricted)
108108
o.Email = i.Email
109109

110-
return
110+
return o
111111
}
112112

113113
// ListUsers lists Users on the account

betas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/linode/linodego/internal/parseabletime"
99
)
1010

11-
// Beta Program is a new product or service that is not generally available to all Akamai customers.
11+
// BetaProgram is a new product or service that is not generally available to all Akamai customers.
1212
// Users must enroll into a beta in order to access the functionality.
1313
type BetaProgram struct {
1414
Label string `json:"label"`

client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const (
4545
APIEnvVar = "LINODE_TOKEN"
4646
// APISecondsPerPoll how frequently to poll for new Events or Status in WaitFor functions
4747
APISecondsPerPoll = 3
48-
// Maximum wait time for retries
48+
// APIRetryMaxWaitTime is the maximum wait time for retries
4949
APIRetryMaxWaitTime = time.Duration(30) * time.Second
5050
APIDefaultCacheExpiration = time.Minute * 15
5151
)
@@ -171,7 +171,7 @@ func NewClient(hc *http.Client) (client Client) {
171171
SetDebug(envDebug).
172172
enableLogSanitization()
173173

174-
return
174+
return client
175175
}
176176

177177
// NewClientFromEnv creates a Client and initializes it with values

client_monitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func NewMonitorClient(hc *http.Client) (mClient MonitorClient) {
6666

6767
mClient.SetDebug(envDebug)
6868

69-
return
69+
return mClient
7070
}
7171

7272
// SetUserAgent sets a custom user-agent for HTTP requests

0 commit comments

Comments
 (0)