infra
/
goutils
Archived
1
0
Fork 0
This repository has been archived on 2022-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
goutils/tmpl/internal.go

24 lines
456 B
Go

package tmpl
import (
"reflect"
_ "unsafe"
)
//go:linkname indirectInterface text/template.indirectInterface
//go:nosplit
func indirectInterface(v reflect.Value) reflect.Value
//go:linkname truth text/template.truth
//go:nosplit
func truth(arg reflect.Value) bool
//go:linkname isTrue text/template.isTrue
//go:nosplit
func isTrue(arg reflect.Value) (truth, ok bool)
func evalTrue(val reflect.Value) (truth bool) {
truth, _ = isTrue(val)
return
}