@@ -82,7 +82,7 @@ func (s *Config) TimeoutDur() time.Duration {
82
82
}
83
83
84
84
// 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
86
86
client * http.Client ) (* http.Response , error ) {
87
87
if params == nil {
88
88
params = make (url.Values )
@@ -97,9 +97,9 @@ func (s *Config) GetContextClient(ctx context.Context, api string, params url.Va
97
97
return nil , fmt .Errorf ("http.NewRequest(): %w" , err )
98
98
}
99
99
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" ) {
103
103
params .Set ("format" , "xml" )
104
104
req .Header .Add ("Accept" , "application/xml" )
105
105
}
0 commit comments