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 4d45064 commit fd34bfb
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_TP_STATE_ENABLED
}
pol.FilterId = parsedFilterID
pol.Error = parsedError
pol.Info = ""
Expand Down

0 comments on commit fd34bfb

Please sign in to comment.