Skip to content

Commit

Permalink
remove toString and int64
Browse files Browse the repository at this point in the history
  • Loading branch information
adityacs authored and cyriltovena committed Mar 16, 2021
1 parent f45efc7 commit 1a2f7f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions pkg/logql/log/fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ var (
"trimAll",
"trimSuffix",
"trimPrefix",
"toString",
"int64",
"int",
"float64",
"add",
Expand Down
11 changes: 2 additions & 9 deletions pkg/logql/log/fmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,12 @@ func Test_lineFormatter_Format(t *testing.T) {
labels.Labels{{Name: "foo", Value: "20"}},
},
{
"float64inttoString",
newMustLineFormatter("{{ \"2.5\" | float64 | int | add 10 | toString }}"),
"float64int",
newMustLineFormatter("{{ \"2.5\" | float64 | int | add 10}}"),
labels.Labels{{Name: "foo", Value: "2.5"}},
[]byte("12"),
labels.Labels{{Name: "foo", Value: "2.5"}},
},
{
"float64toString",
newMustLineFormatter("{{ .foo | float64 | addf 10 | toString }}"),
labels.Labels{{Name: "foo", Value: "2.5"}},
[]byte("12.5"),
labels.Labels{{Name: "foo", Value: "2.5"}},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 1a2f7f0

Please sign in to comment.