Closed drewwells closed 6 years ago
Here's the diff to fix it
diff --git a/main.go b/main.go
index 26fd520..d6528d6 100644
--- a/main.go
+++ b/main.go
@@ -19,7 +19,7 @@ type pkgWrapper struct {
}
func render(templateString string, sourcePath string, pkg *wrapgen.Package, r string, l string) (string, error) {
- var t, e = template.New("wrapgen").Funcs(sprig.TxtFuncMap()).Delims(r, l).Parse(templateString)
+ var t, e = template.New("wrapgen").Funcs(sprig.TxtFuncMap()).Delims(l, r).Parse(templateString)
if e != nil {
return "", e
}
Wow! Thanks for catching that and pointing it out. While I was in there I noticed the default options for the flags were also swapped which is why the sample templates worked.
I merged a patch which corrects both of those problems (https://github.com/kevinconway/wrapgen/pull/5). I appreciate you taking the time to try out the tool and letting me know that something was off.
Using the example in the readme.md