Make go vet pass

This commit is contained in:
gezimbll
2023-10-26 05:26:19 -04:00
committed by Dan Christian Bogos
parent 16a9c7033f
commit 969ef4b754
3 changed files with 11 additions and 12 deletions

View File

@@ -40,7 +40,6 @@ jobs:
run: gofmt -s -w . && git diff --exit-code
- name: Go Vet
continue-on-error: true # option will soon be removed
run: go vet ./...
- name: Go Tidy

View File

@@ -4465,8 +4465,8 @@ func TestModelHelperCsvLoadError(t *testing.T) {
type testStruct struct {
Id int64
Tpid string
Tag string `index:"cat" re:"\w+\s*,\s*"`
Prefix string `index:"1" re:"\+?\d+.?\d*"`
Tag string `index:"cat" re:".*"`
Prefix string `index:"1" re:".*"`
CreatedAt time.Time
}
var testStruct1 testStruct
@@ -4481,7 +4481,7 @@ func TestModelHelperCsvLoadError2(t *testing.T) {
Id int64
Tpid string
Tag string `index:"0" re:"cat"`
Prefix string `index:"1" re:"\+?\d+.?\d*"`
Prefix string `index:"1" re:".*"`
CreatedAt time.Time
}
var testStruct1 testStruct
@@ -4496,8 +4496,8 @@ func TestModelHelpersCsvDumpError(t *testing.T) {
type testStruct struct {
Id int64
Tpid string
Tag string `index:"cat" re:"\w+\s*,\s*"`
Prefix string `index:"1" re:"\+?\d+.?\d*"`
Tag string `index:"cat" re:".*"`
Prefix string `index:"1" re:".*"`
CreatedAt time.Time
}
var testStruct1 testStruct
@@ -5907,7 +5907,7 @@ func TestModelHelpersCSVLoadErrorInt(t *testing.T) {
type testStruct struct {
Id int64
Tpid string
Tag int `index:"0" re:"\w+\s*,\s*"`
Tag int `index:"0" re:".*"`
CreatedAt time.Time
}
@@ -5921,7 +5921,7 @@ func TestModelHelpersCSVLoadErrorFloat64(t *testing.T) {
type testStruct struct {
Id int64
Tpid string
Tag float64 `index:"0" re:"\w+\s*,\s*"`
Tag float64 `index:"0" re:".*"`
CreatedAt time.Time
}
@@ -5935,7 +5935,7 @@ func TestModelHelpersCSVLoadErrorBool(t *testing.T) {
type testStruct struct {
Id int64
Tpid string
Tag bool `index:"0" re:"\w+\s*,\s*"`
Tag bool `index:"0" re:".*"`
CreatedAt time.Time
}

View File

@@ -175,11 +175,11 @@ func (t *Threshold) ProcessEvent(args *utils.CGREvent, dm *DataManager, fltrS *F
at.accountIDs = utils.NewStringMap(tntAcnt)
}
if t.tPrfl.Async {
go func() {
go func(setID string) {
if errExec := at.Execute(fltrS); errExec != nil {
utils.Logger.Warning(fmt.Sprintf("<ThresholdS> failed executing actions: %s, error: %s", actionSetID, errExec.Error()))
utils.Logger.Warning(fmt.Sprintf("<ThresholdS> failed executing actions: %s, error: %s", setID, errExec.Error()))
}
}()
}(actionSetID)
} else if errExec := at.Execute(fltrS); errExec != nil {
utils.Logger.Warning(fmt.Sprintf("<ThresholdS> failed executing actions: %s, error: %s", actionSetID, errExec.Error()))
err = utils.ErrPartiallyExecuted