chore: fix build
This commit is contained in:
parent
69a37555cd
commit
b6e3d1d9fe
2 changed files with 1 additions and 16 deletions
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/samber/lo"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
|
|
@ -40,5 +39,5 @@ func trimEmptyLines(s string) string {
|
|||
lines[i] = ""
|
||||
}
|
||||
}
|
||||
return strings.Join(lo.Compact(lines), "\n")
|
||||
return strings.Join(lines, "\n")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,17 +32,3 @@ func TestYamlDecodeLeadingZero(t *testing.T) {
|
|||
t.Fatalf("expected %s, got %s", exp, res)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTrimEmptyLines(t *testing.T) {
|
||||
lines := `
|
||||
foo
|
||||
bar
|
||||
|
||||
|
||||
buz
|
||||
`
|
||||
|
||||
assert.Equal(t, trimEmptyLines(lines), `foo
|
||||
bar
|
||||
buz`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue