mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
deps: use go-cs-lib 0.13 (#3136)
This commit is contained in:
parent
c4bfdf1991
commit
189fb9ca1b
3 changed files with 6 additions and 17 deletions
2
go.mod
2
go.mod
|
@ -26,7 +26,7 @@ require (
|
|||
github.com/corazawaf/libinjection-go v0.1.2
|
||||
github.com/crowdsecurity/coraza/v3 v3.0.0-20240108124027-a62b8d8e5607
|
||||
github.com/crowdsecurity/dlog v0.0.0-20170105205344-4fb5f8204f26
|
||||
github.com/crowdsecurity/go-cs-lib v0.0.11
|
||||
github.com/crowdsecurity/go-cs-lib v0.0.13
|
||||
github.com/crowdsecurity/grokky v0.2.1
|
||||
github.com/crowdsecurity/machineid v1.0.2
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
|
|
4
go.sum
4
go.sum
|
@ -105,8 +105,8 @@ github.com/crowdsecurity/coraza/v3 v3.0.0-20240108124027-a62b8d8e5607 h1:hyrYw3h
|
|||
github.com/crowdsecurity/coraza/v3 v3.0.0-20240108124027-a62b8d8e5607/go.mod h1:br36fEqurGYZQGit+iDYsIzW0FF6VufMbDzyyLxEuPA=
|
||||
github.com/crowdsecurity/dlog v0.0.0-20170105205344-4fb5f8204f26 h1:r97WNVC30Uen+7WnLs4xDScS/Ex988+id2k6mDf8psU=
|
||||
github.com/crowdsecurity/dlog v0.0.0-20170105205344-4fb5f8204f26/go.mod h1:zpv7r+7KXwgVUZnUNjyP22zc/D7LKjyoY02weH2RBbk=
|
||||
github.com/crowdsecurity/go-cs-lib v0.0.11 h1:ygUOKrkMLaJ2wjC020LgtY6XDkToNFK4NmYlhpkk5ko=
|
||||
github.com/crowdsecurity/go-cs-lib v0.0.11/go.mod h1:8FMKNGsh3hMZi2SEv6P15PURhEJnZV431XjzzBSuf0k=
|
||||
github.com/crowdsecurity/go-cs-lib v0.0.13 h1:asmtjIEPOibUK8eaYQCIR7XIBU/EX5vyAp1EbKFQJtY=
|
||||
github.com/crowdsecurity/go-cs-lib v0.0.13/go.mod h1:ePyQyJBxp1W/1bq4YpVAilnLSz7HkzmtI7TRhX187EU=
|
||||
github.com/crowdsecurity/grokky v0.2.1 h1:t4VYnDlAd0RjDM2SlILalbwfCrQxtJSMGdQOR0zwkE4=
|
||||
github.com/crowdsecurity/grokky v0.2.1/go.mod h1:33usDIYzGDsgX1kHAThCbseso6JuWNJXOzRQDGXHtWM=
|
||||
github.com/crowdsecurity/machineid v1.0.2 h1:wpkpsUghJF8Khtmn/tg6GxgdhLA1Xflerh5lirI+bdc=
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
Codename string // = "SoumSoum"
|
||||
Codename string // = "SoumSoum"
|
||||
Libre2 = "WebAssembly"
|
||||
)
|
||||
|
||||
|
@ -21,19 +21,8 @@ const (
|
|||
Constraint_acquis = ">= 1.0, < 2.0"
|
||||
)
|
||||
|
||||
func versionWithTag() string {
|
||||
// if the version number already contains the tag, don't duplicate it
|
||||
ret := version.Version
|
||||
|
||||
if !strings.HasSuffix(ret, version.Tag) && !strings.HasSuffix(ret, "g"+version.Tag+"-dirty") {
|
||||
ret += "-" + version.Tag
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func FullString() string {
|
||||
ret := fmt.Sprintf("version: %s\n", versionWithTag())
|
||||
ret := fmt.Sprintf("version: %s\n", version.String())
|
||||
ret += fmt.Sprintf("Codename: %s\n", Codename)
|
||||
ret += fmt.Sprintf("BuildDate: %s\n", version.BuildDate)
|
||||
ret += fmt.Sprintf("GoVersion: %s\n", version.GoVersion)
|
||||
|
@ -49,7 +38,7 @@ func FullString() string {
|
|||
}
|
||||
|
||||
func UserAgent() string {
|
||||
return "crowdsec/" + versionWithTag() + "-" + version.System
|
||||
return "crowdsec/" + version.String() + "-" + version.System
|
||||
}
|
||||
|
||||
// VersionStrip remove the tag from the version string, used to match with a hub branch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue