Skip to content

Commit 8f09772

Browse files
committed
updated mod and added an error in custom cookies from env
1 parent 482eb5a commit 8f09772

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ require (
1515
github.com/davecgh/go-spew v1.1.1 // indirect
1616
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
1717
github.com/pmezard/go-difflib v1.0.0 // indirect
18-
github.com/stretchr/objx v0.5.2 // indirect
1918
go.uber.org/multierr v1.11.0 // indirect
2019
golang.org/x/text v0.16.0 // indirect
2120
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
1010
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1111
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1212
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
13-
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
14-
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
1513
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
1614
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
1715
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=

httpclient/client.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,10 @@ const ()
2424

2525
// Master struct/object
2626
type Client struct {
27-
// Config
28-
config *ClientConfig
29-
30-
// Integration
27+
config *ClientConfig
3128
Integration *APIIntegration
32-
33-
// Executor
34-
http *http.Client
35-
36-
// Logger
37-
Sugar *zap.SugaredLogger
38-
39-
// Concurrency Mananger
29+
http *http.Client
30+
Sugar *zap.SugaredLogger
4031
Concurrency *concurrency.ConcurrencyHandler
4132
}
4233

@@ -111,6 +102,7 @@ func (c *ClientConfig) Build() (*Client, error) {
111102
if err != nil {
112103
return nil, fmt.Errorf("invalid configuration: %v", err)
113104
}
105+
114106
c.Sugar.Debug("configuration valid")
115107

116108
httpClient := &http.Client{

httpclient/config_validation.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ func LoadConfigFromEnv() (*ClientConfig, error) {
8787
Name: parts[0],
8888
Value: parts[1],
8989
})
90+
} else {
91+
return nil, fmt.Errorf("invalid env cookie configuration: %s", parts)
9092
}
9193
}
9294
config.CustomCookies = cookies

0 commit comments

Comments
 (0)