amuz.es/src/infra/goutils@v0.1.3/tmpl/internal.go (about) 1 package tmpl 2 3 import ( 4 "reflect" 5 _ "unsafe" 6 ) 7 8 //go:linkname indirectInterface text/template.indirectInterface 9 //go:nosplit 10 func indirectInterface(v reflect.Value) reflect.Value 11 12 //go:linkname truth text/template.truth 13 //go:nosplit 14 func truth(arg reflect.Value) bool 15 16 //go:linkname isTrue text/template.isTrue 17 //go:nosplit 18 func isTrue(arg reflect.Value) (truth, ok bool) 19 20 func evalTrue(val reflect.Value) (truth bool) { 21 truth, _ = isTrue(val) 22 return 23 }