Hi all, has anyone tried using the “embed” package in the 1.16 beta 1 release?
My data.go file looks as: package main import "embed" //go:embed templates/main.go.tmpl var tmplMainGo []byte When I build the program, I get this: ~/go/bin/go1.16beta1 build # github.com/amitsaha/go-embed ./data.go:3:8: imported and not used: “embed” Now, I understand the error, but what’s the fix? I blindly tried to remove the import, but then I get: # github.com/amitsaha/go-embed ./data.go:5:3: //go:embed only allowed in Go files that import “embed" What am I doing wrong? My test code is here: https://github.com/amitsaha/go-embed Thank you. Best Regards, Amit. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9D4EF5A9-9C67-4CF1-B443-CF05FD155D94%40gmail.com.
