Skip to content

Commit

Permalink
tidy and fix contains
Browse files Browse the repository at this point in the history
  • Loading branch information
jesusfcr committed Oct 6, 2023
1 parent 0b0a14d commit ec6e634
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 h1:9k5exFQKQglLo+RoP+4zMjOFE14P6+vyR0baDAi0Rcs=
golang.org/x/exp v0.0.0-20231005195138-3e424a577f31/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/findings.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func validateFindingTransition(finding model.FindingExpanded, payload model.Patc
"FALSE_POSITIVE": {"OPEN"},
"FIXED": {"FALSE_POSITIVE"},
}
if _, valid := slices.Contains(validTransitions[finding.Status], payload.Status); !valid {
if valid := slices.Contains(validTransitions[finding.Status], payload.Status); !valid {
return echo.NewHTTPError(http.StatusConflict, fmt.Sprintf("Status transition not allowed: from '%s' to '%s'", finding.Status, payload.Status))
}
return nil
Expand Down

0 comments on commit ec6e634

Please sign in to comment.