tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

not support #v directive in fmt.Sprintf

Open hunjixin opened this issue 2 years ago • 0 comments

code

func main() {
	fmt.Sprintf("%#v", struct {
		str string
	}{str: "asdasdasda"})
}

err message

panic: (reflect.Value).Interface: unexported
error: failed to run compiled binary /var/folders/_v/lltqd75s3tsdpkr65klgzwch0000gn/T/tinygo2195710682/main: signal: abort trap

reason for this issue is reflect. unablel to get value of private field, did plan to support this feature?

hunjixin avatar Jul 13 '22 08:07 hunjixin