daemon/logger/splunk: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
984d5bc30c
commit
9c590ed5c5
2 changed files with 2 additions and 2 deletions
|
@ -495,7 +495,7 @@ func (l *splunkLogger) tryPostMessages(ctx context.Context, messages []*splunkMe
|
|||
return err
|
||||
}
|
||||
}
|
||||
req, err := http.NewRequest("POST", l.url, bytes.NewBuffer(buffer.Bytes()))
|
||||
req, err := http.NewRequest(http.MethodPost, l.url, bytes.NewBuffer(buffer.Bytes()))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ func TestNewWithProxy(t *testing.T) {
|
|||
proxyFunc := splunkLogger.transport.Proxy
|
||||
assert.Assert(t, proxyFunc != nil)
|
||||
|
||||
req, err := http.NewRequest("GET", splunkURL, nil)
|
||||
req, err := http.NewRequest(http.MethodGet, splunkURL, nil)
|
||||
assert.NilError(t, err)
|
||||
|
||||
proxyURL, err := proxyFunc(req)
|
||||
|
|
Loading…
Add table
Reference in a new issue