Skip to content

Commit 6682066

Browse files
committed
fix: set vcsurl.Client to respect --timeout for branch/GitLab detection
1 parent 113dd2b commit 6682066

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module github.com/italia/publiccode-parser-go/v5
22

33
require (
4-
github.com/alranel/go-vcsurl/v2 v2.0.3
4+
github.com/alranel/go-vcsurl/v2 v2.1.0
55
github.com/github/go-spdx/v2 v2.3.3
66
github.com/go-playground/locales v0.14.1
77
github.com/go-playground/universal-translator v0.18.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/alranel/go-vcsurl/v2 v2.0.3 h1:B7N0igbMJuv8xr4Mj8DrcdL3wmzclMzzXWneEaGtkLc=
2-
github.com/alranel/go-vcsurl/v2 v2.0.3/go.mod h1:pCJeg9/vFXM8bvHp45/Go98cRABcx5hKJgh9WZaYzqU=
1+
github.com/alranel/go-vcsurl/v2 v2.1.0 h1:kP5Yij+3ViGP+YGrJaF4LGi3LLfxXRmPlz7mOq3BvDM=
2+
github.com/alranel/go-vcsurl/v2 v2.1.0/go.mod h1:pCJeg9/vFXM8bvHp45/Go98cRABcx5hKJgh9WZaYzqU=
33
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
55
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

parser.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ func NewParser(config ParserConfig) (*Parser, error) {
111111
}
112112

113113
httpClient := &http.Client{Timeout: timeout}
114+
vcsurl.Client = httpClient
114115
p := Parser{
115116
disableNetwork: config.DisableNetwork,
116117
disableExternalChecks: config.DisableExternalChecks,

0 commit comments

Comments
 (0)