Overview
In this blog I am going to explain about basic go command and in depth knowledge about go commands will come after this series of basic go programming end.
fallowing topic will be explained in this blog :
- primary commands
- help topic
Commands
Go ahead open command prompt on type go and press Enter.
Primary Commands
this all are primary commands that go provide. this all are self explanatory. we have "bug" command for bug report, "clean" to clean previous projects, "install" to install packages to project.mod command needs explanation. which we will discuss on the next blog.
but the command I want to talk about is doc. if we run ''go doc <package name>'' command
example "go doc json.decoder.decode" it will show the out put below.
and if you run "go doc json.decoder" it will show the out put below.
and if you run "go doc json" it will show the out put below.
so what "go doc" command do is, it will go to the source code and show the documentation comment that has been written to help understand code and api.
for "go doc json.decoder.decode" comment it went to the json package and decoder object and decode method and displayed the documentation comments.
Additional Help Topic
if you need any help regarding the commands, just run "go help <topic name>" it will provide you with the necessary information to use that command. Advance knowledge about go command will be provided in an different series of blog.
Previous Blog | Next Blog |
---|---|
Hello world with Go Lang | Create a project with Go Lang |
Other blog on this series :
Comments
Post a Comment