diff --git a/go.mod b/go.mod index 3a3e85a..fd70d5b 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.2 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/text v0.16.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 32359a2..c476ffc 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/httpclient/client.go b/httpclient/client.go index a857860..0a7593b 100644 --- a/httpclient/client.go +++ b/httpclient/client.go @@ -24,19 +24,10 @@ const () // Master struct/object type Client struct { - // Config - config *ClientConfig - - // Integration + config *ClientConfig Integration *APIIntegration - - // Executor - http *http.Client - - // Logger - Sugar *zap.SugaredLogger - - // Concurrency Mananger + http *http.Client + Sugar *zap.SugaredLogger Concurrency *concurrency.ConcurrencyHandler } @@ -111,6 +102,7 @@ func (c *ClientConfig) Build() (*Client, error) { if err != nil { return nil, fmt.Errorf("invalid configuration: %v", err) } + c.Sugar.Debug("configuration valid") httpClient := &http.Client{ diff --git a/httpclient/config_validation.go b/httpclient/config_validation.go index beec74a..6f59a39 100644 --- a/httpclient/config_validation.go +++ b/httpclient/config_validation.go @@ -87,6 +87,8 @@ func LoadConfigFromEnv() (*ClientConfig, error) { Name: parts[0], Value: parts[1], }) + } else { + return nil, fmt.Errorf("invalid env cookie configuration: %s", parts) } } config.CustomCookies = cookies