Go to goproxy.io, open CMD, and enter
go env -w GOPROXY=https://goproxy.io,direct
Subsequent go commands will quickly pull the required dependency code from the public proxy image;
Restart VSCode, open any go file, save, the bottom right corner will prompt install dependencies, select install all;
=
Golong based tool for automatically generating the corresponding struct file according to XML file
By reading in an XML file, the corresponding struct is automatically generated and saved in the specified file.
XmlLoader. Go and xmlNodeStructCreator. Go are the following two files.
XmlLoader. Go parses the XML into a chained structured data. XmlNodeStructCreator. Go recursively extracts node information from the chained structured data and generates the corresponding structure file of the XML.
This is rough, especially the naming of field in the structure, which is directly named after the node. Interested friends can change it by themselves.
In addition, the Repository contains two other widgets that you may be interested in viewing.
Tool source code
XmlLoader. Go and xmlNodeStructCreator. Go are the following two files.
XmlLoader. Go parses the XML into a chained structured data. XmlNodeStructCreator. Go recursively extracts node information from the chained structured data and generates the corresponding structure file of the XML.
This is rough, especially the naming of field in the structure, which is directly named after the node. Interested friends can change it by themselves.
In addition, the Repository contains two other widgets that you may be interested in viewing.
Tool source code