Skip to content

Commit

Permalink
cmd/tetra: remove use of deprecated pol.Enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
  • Loading branch information
mtardy committed Feb 21, 2024
1 parent 8391e1c commit 8a568b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/tetra/tracingpolicy/tracingpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ func New() *cobra.Command {
str := strings.NewReader(pol.Info)
_, err := fmt.Fscanf(str, "%253s enabled:%t filterID:%d error:%512s", &parsedName, &parsedEnabled, &parsedFilterID, &parsedError)
if err == nil {
pol.Enabled = parsedEnabled
if parsedEnabled {
pol.State = tetragon.TracingPolicyState_ENABLED

Check failure on line 171 in cmd/tetra/tracingpolicy/tracingpolicy.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: tetragon.TracingPolicyState_ENABLED) (typecheck)

Check failure on line 171 in cmd/tetra/tracingpolicy/tracingpolicy.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: tetragon.TracingPolicyState_ENABLED (typecheck)
}
pol.FilterId = parsedFilterID
pol.Error = parsedError
pol.Info = ""
Expand Down

0 comments on commit 8a568b0

Please sign in to comment.