Why jas donot have a default value in func RequireXXX
codeskyblue opened this issue · 1 comments
codeskyblue commented
Some times default value is needed. But I have to use such code with jas.
str, err := ctx.FindString(paths...)
if err != nil {
str = defaultStr
}
It is a little strange. Why cannot do it like that.
str := ctx.RequireDefaultString(defaultStr, paths...)
coocood commented
It is a nice feature to have.
Can you implement it, write a couple of test cases and send me a pull request?
Thank you.