mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
refact: pkg/apiclient set and use default user agent (#3219)
* default user agent * DRY default user agent * useragent.go * moved to pkg/apiclient/useragent * lint * rename useragent.DefaultUserAgent() -> useragent.Default()
This commit is contained in:
parent
57dee1abf9
commit
c8750f604c
22 changed files with 82 additions and 95 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/crowdsecurity/crowdsec/pkg/apiclient"
|
||||
"github.com/crowdsecurity/crowdsec/pkg/cwversion"
|
||||
)
|
||||
|
||||
func TestAPICSendMetrics(t *testing.T) {
|
||||
|
@ -70,7 +69,7 @@ func TestAPICSendMetrics(t *testing.T) {
|
|||
apiClient, err := apiclient.NewDefaultClient(
|
||||
url,
|
||||
"/api",
|
||||
cwversion.UserAgent(),
|
||||
"",
|
||||
nil,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue