Skip to content

Commit ea6f95c

Browse files
committed
fix(cli): Fix rule yaml indent and provide feedback
Fix the wrong indentation in the rule labels and provide the feedback to user after creating the rule file.
1 parent bc68f2b commit ea6f95c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/fibratus/app/rules/create.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package rules
2020

2121
import (
2222
"fmt"
23+
"github.com/enescakir/emoji"
2324
"github.com/google/uuid"
2425
"github.com/rabbitstack/fibratus/pkg/config"
2526
"github.com/rabbitstack/fibratus/pkg/util/version"
@@ -37,7 +38,7 @@ description: |
3738
{{- if .Labels }}
3839
labels:
3940
{{- range $key, $value := .Labels }}
40-
{{ $key }}: {{ $value }}
41+
{{ $key }}: {{ $value }}
4142
{{- end -}}
4243
{{ end }}
4344
@@ -99,5 +100,7 @@ func createRule(name string) error {
99100
return err
100101
}
101102

103+
emo("%v created %s. Open the file and craft the rule condition, define an optional action, or fill out other attributes", emoji.Rocket, n)
104+
102105
return nil
103106
}

0 commit comments

Comments
 (0)