Skip to content

Commit 23ee694

Browse files
committed
- [+] add limitation of function coalesce
1 parent 6797d05 commit 23ee694

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ _testmain.go
2525
*.prof
2626

2727
*~
28+
.idea/

t_strings_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ func TestStringManipulation(t *testing.T) {
211211
`{{ coalesce .StrEmpty "Something else" }}`,
212212
"Something else",
213213
},
214+
// NOK! The following will failed the template.Execute
215+
// before the coalesce function can do anything
216+
// {
217+
// `{{ coalesce .StrNone "Not exist" }}`,
218+
// "Not exist",
219+
// },
214220
}
215221

216222
testStringManipulation(t, testData)

0 commit comments

Comments
 (0)