Skip to content

Commit d95d8e4

Browse files
committed
fix lint issue
1 parent e53356c commit d95d8e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

errors.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ func coupleAPIErrorsHTTP(resp *http.Response, err error) (*http.Response, error)
144144
}
145145

146146
func (e APIError) Error() string {
147-
x := []string{}
148-
for _, msg := range e.Errors {
149-
x = append(x, msg.Error())
147+
x := make([]string, len(e.Errors))
148+
for i, msg := range e.Errors {
149+
x[i] = msg.Error()
150150
}
151151

152152
return strings.Join(x, "; ")

0 commit comments

Comments
 (0)