Skip to content

Commit d3d56d9

Browse files
authored
Merge pull request #3646 from alexandear-org/remove-unused-trim-string
Remove unused textutil.TrimString
2 parents eb46f74 + 352c051 commit d3d56d9

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

pkg/textutil/textutil.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ func IndentString(size int, text string) string {
4444
return PrefixString(prefix, text)
4545
}
4646

47-
// TrimString removes characters from beginning and end.
48-
func TrimString(cutset, text string) string {
49-
return strings.Trim(text, cutset)
50-
}
51-
5247
// MissingString returns message if the text is empty.
5348
func MissingString(message, text string) string {
5449
if text == "" {

pkg/textutil/textutil_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ func TestIndentString(t *testing.T) {
2424
assert.Equal(t, " foo\n bar\n", IndentString(2, "foo\nbar\n"))
2525
}
2626

27-
func TestTrimString(t *testing.T) {
28-
assert.Equal(t, "foo", TrimString("\n", "foo"))
29-
assert.Equal(t, "bar", TrimString("\n", "bar\n"))
30-
}
31-
3227
func TestMissingString(t *testing.T) {
3328
assert.Equal(t, "no", MissingString("no", ""))
3429
assert.Equal(t, "msg", MissingString("no", "msg"))

0 commit comments

Comments
 (0)