Fix linter issues
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
8b046647e6
commit
c59d1cd5b0
@ -106,10 +106,8 @@ func FetchTokenWithOAuth(ctx context.Context, client *http.Client, headers http.
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
|
req.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
|
||||||
if headers != nil {
|
for k, v := range headers {
|
||||||
for k, v := range headers {
|
req.Header[k] = append(req.Header[k], v...)
|
||||||
req.Header[k] = append(req.Header[k], v...)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := ctxhttp.Do(ctx, client, req)
|
resp, err := ctxhttp.Do(ctx, client, req)
|
||||||
@ -152,10 +150,8 @@ func FetchToken(ctx context.Context, client *http.Client, headers http.Header, t
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if headers != nil {
|
for k, v := range headers {
|
||||||
for k, v := range headers {
|
req.Header[k] = append(req.Header[k], v...)
|
||||||
req.Header[k] = append(req.Header[k], v...)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reqParams := req.URL.Query()
|
reqParams := req.URL.Query()
|
||||||
|
@ -31,8 +31,6 @@ import (
|
|||||||
var (
|
var (
|
||||||
// check to make sure the *service implements the GRPC API
|
// check to make sure the *service implements the GRPC API
|
||||||
_ = (taskAPI.TaskService)(&service{})
|
_ = (taskAPI.TaskService)(&service{})
|
||||||
// common response type
|
|
||||||
empty = &ptypes.Empty{}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// New returns a new shim service
|
// New returns a new shim service
|
||||||
@ -121,7 +119,7 @@ func (s *service) Connect(ctx context.Context, r *taskAPI.ConnectRequest) (*task
|
|||||||
// Shutdown is called after the underlying resources of the shim are cleaned up and the service can be stopped
|
// Shutdown is called after the underlying resources of the shim are cleaned up and the service can be stopped
|
||||||
func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*ptypes.Empty, error) {
|
func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*ptypes.Empty, error) {
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
return empty, nil
|
return &ptypes.Empty{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stats returns container level system stats for a container and its processes
|
// Stats returns container level system stats for a container and its processes
|
||||||
|
Loading…
Reference in New Issue
Block a user