#include json file in build
10 messages · Page 1 of 1 (latest)
yes look up embed
Ok, lettme see if this works
thx
I'm trying to implement this, and i've gotten this
//go:embed config/default_ranks.json
var defaultRanksJson []byte
err := InitializeRanksFromJSON(defaultRanksJson)
but VSCode is complaining
go:embed directives must precede a "var" declaration
Am I misunderstanding something here?
it has to be a global outside of function
ah thank you so much!
this fixed it!
yw!