The use of Go GUI----walk

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Go is a service-side language, but using go can also be used to implement the client, which is implemented using walk.

git address for walk:

Walk's description document: Https://

Git on go gives an example of implementing a simple GUI. Here are a few things to note:

1, use go get will download the project to Gopath, here Gopath can't be like goroot, but you can goroot create a work folder, and then Gopath to navigate to this folder. It should be noted that Gopath is an environment variable, not a workspace, and our workspace needs to be configured to Gopath, but it is important to note that the things you get with go get are placed in the first path of Gopath, which is easy to confuse and need to be aware of. It is also important to note that Pycharm may need to restart the computer for environment variables to detect, but also need to manually add the project path to go Library->global Libray, note is not the working directory, but the project path.

2, go build back if followed by a single go file name, then compile a single file as EXE file, and EXE name is the name of the go file. If go build-o name.exe then you can modify the input EXE file to Name.exe. Use Go build-ldflags= "-H Windowsgui" to let EXE run without pop-up cmd window. Also note that when compiling, do not specify a single file go build, because the main package even if there is no other go file, but still need to introduce other files.

3, RSRC.SYSO files need to be with manifest in a directory. Otherwise EXE will not run out of the GUI.

4, run the command go get can load compile GUI need compiler rsrc.exe, run this command after gopath a bin folder, the Bin folder next to have a rsrc.exe. So the Gopath path has the Src,pkg,bin folder.

5. Compile Command rsrc-manifest Xxx.manifest-o Rsrc.syso, rsrc refers to Rsrc.exe, so if not configured in the environment variable, you can use the path to specify, and Xxx.manifest is under the project need to create our own manifest file,-o rsrc.syso is the output file. This is because the compilation needs to be located under the main package, so the final rsrc.syso will appear under the main package.

Here for the creation of an interface, are under a MainWindow, using the key-value pair method of deployment, using the run () method to run. Layouts are layout elements, and child controls are children

Not completed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.