Skip to content

Commit

Permalink
optimize the writing of the label plugin: ignore the spaces before an…
Browse files Browse the repository at this point in the history
…d after the paragraph

Signed-off-by: wb-hjh933779 <[email protected]>
  • Loading branch information
bxy4543 committed May 19, 2022
1 parent 06497df commit 6b8b0fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugin/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (l LabelsNodes) formatData(data string, hosts []string) map[string][]label
return m
}
for _, v := range items {
tmps := strings.Split(v, " ")
tmps := strings.Split(strings.TrimSpace(v), " ")
if len(tmps) != 2 {
//logger.Warn("label data is no-compliance with the rules! label data: %v", v)
continue
Expand Down

0 comments on commit 6b8b0fe

Please sign in to comment.