Next, let's run the program to ensure it works. For added convenience, we'll
add the install directory to our PATH
to make running binaries
easy:
# Windows users should consult https://github.com/golang/go/wiki/SettingGOPATH
# for setting %PATH%.
$ export PATH=$PATH:$(dirname $(go list -f '{{.Target}}' .))
$ hello
Hello, world.
$
If you want to change selection, open document below and click on "Move attachment"
How to Write Go Code - The Go Programming Languagee in the current working directory if no other path is given. So in our working directory, the following commands are all equivalent: $ go install example/user/hello $ go install . $ go install <span>Next, let's run the program to ensure it works. For added convenience, we'll add the install directory to our PATH to make running binaries easy: # Windows users should consult https://github.com/golang/go/wiki/SettingGOPATH # for setting %PATH%. $ export PATH=$PATH:$(dirname $(go list -f '{{.Target}}' .)) $ hello Hello, world. $ If you're using a source control system, now would be a good time to initialize a repository, add the files, and commit your first change. Again, this step is optional: you do not need Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details