Wonderful tutorial! Thank you so much! I am trying to learn Go through coding a Discord Bot and this provides me with a very basic outline of what I have to do. Worked like a charm too. :)
One tiny issue in the code: json: "name" in the Gopher struct should have no space after json: or you'll get a warning like "struct field tag json: "name" not compatible with reflect.StructTag.Get: bad syntax for struct tag value".
Was a bit worrisome to me as a total newbie before I googled the fix. :)
Wonderful tutorial! Thank you so much! I am trying to learn Go through coding a Discord Bot and this provides me with a very basic outline of what I have to do. Worked like a charm too. :)
One tiny issue in the code:
json: "name"
in the Gopher struct should have no space after json: or you'll get a warning like "struct field tagjson: "name"
not compatible with reflect.StructTag.Get: bad syntax for struct tag value".Was a bit worrisome to me as a total newbie before I googled the fix. :)
Thanks Jan
You use which version of Go? :)
I use 1.17.3.