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 20, 2024
1 parent ad79072 commit 4f8db8b
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
}
pol.FilterId = parsedFilterID
pol.Error = parsedError
pol.Info = ""
Expand Down

0 comments on commit 4f8db8b

Please sign in to comment.