Go vet emits invalid json code

Running go vet -json .\cmd\factoryinput\ emits the following string:

# github.com/united-manufacturing-hub/united-manufacturing-hub/cmd/factoryinput
{}

Passing this into json.loads (python), jsonformatter.curiousconcept.com , jsonlint. com or jq lets them throw errors.

Also looking at ECMA-404 (https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf) does not show that # is valid.

System Info

  • go version go1.17.6 windows/amd64
  • jq - commandline JSON processor [version 1.6]
  • Python 3.10.0
  • Windows 11 (Version 21H2) (OS Build 22000.376)

(Sorry for the whitespace in jsonlint .com, but i’m only allowed to insert 2 links)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.