Skip to content

Commit 87b66c0

Browse files
committed
cyclop
1 parent 9954178 commit 87b66c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/server.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (s *Config) TimeoutDur() time.Duration {
8282
}
8383

8484
// GetContextClient is the same as Get except you can pass in your own context and http Client.
85-
func (s *Config) GetContextClient(ctx context.Context, api string, params url.Values,
85+
func (s *Config) GetContextClient(ctx context.Context, api string, params url.Values, //nolint:cyclop
8686
client *http.Client) (*http.Response, error) {
8787
if params == nil {
8888
params = make(url.Values)
@@ -97,9 +97,9 @@ func (s *Config) GetContextClient(ctx context.Context, api string, params url.Va
9797
return nil, fmt.Errorf("http.NewRequest(): %w", err)
9898
}
9999

100-
if a := api; !strings.HasPrefix(a, "++getfile") && !strings.HasPrefix(a, "++event") &&
101-
!strings.HasPrefix(a, "++image") && !strings.HasPrefix(a, "++audio") &&
102-
!strings.HasPrefix(a, "++stream") && !strings.HasPrefix(a, "++video") {
100+
if !strings.HasPrefix(api, "++getfile") && !strings.HasPrefix(api, "++event") &&
101+
!strings.HasPrefix(api, "++image") && !strings.HasPrefix(api, "++audio") &&
102+
!strings.HasPrefix(api, "++stream") && !strings.HasPrefix(api, "++video") {
103103
params.Set("format", "xml")
104104
req.Header.Add("Accept", "application/xml")
105105
}

0 commit comments

Comments
 (0)