Skip to content

Commit c59d1cd

Browse files
committed
Fix linter issues
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent 8b04664 commit c59d1cd

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

remotes/docker/auth/fetch.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,8 @@ func FetchTokenWithOAuth(ctx context.Context, client *http.Client, headers http.
106106
return nil, err
107107
}
108108
req.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
109-
if headers != nil {
110-
for k, v := range headers {
111-
req.Header[k] = append(req.Header[k], v...)
112-
}
109+
for k, v := range headers {
110+
req.Header[k] = append(req.Header[k], v...)
113111
}
114112

115113
resp, err := ctxhttp.Do(ctx, client, req)
@@ -152,10 +150,8 @@ func FetchToken(ctx context.Context, client *http.Client, headers http.Header, t
152150
return nil, err
153151
}
154152

155-
if headers != nil {
156-
for k, v := range headers {
157-
req.Header[k] = append(req.Header[k], v...)
158-
}
153+
for k, v := range headers {
154+
req.Header[k] = append(req.Header[k], v...)
159155
}
160156

161157
reqParams := req.URL.Query()

runtime/v2/example/example.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ import (
3131
var (
3232
// check to make sure the *service implements the GRPC API
3333
_ = (taskAPI.TaskService)(&service{})
34-
// common response type
35-
empty = &ptypes.Empty{}
3634
)
3735

3836
// New returns a new shim service
@@ -121,7 +119,7 @@ func (s *service) Connect(ctx context.Context, r *taskAPI.ConnectRequest) (*task
121119
// Shutdown is called after the underlying resources of the shim are cleaned up and the service can be stopped
122120
func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*ptypes.Empty, error) {
123121
os.Exit(0)
124-
return empty, nil
122+
return &ptypes.Empty{}, nil
125123
}
126124

127125
// Stats returns container level system stats for a container and its processes

0 commit comments

Comments
 (0)