Go concepts
The capital the first word, go run, environment, bin, src, go build, creating virtual env in go, why go (garbage collection), compilation, go offline documentation,
Last updated
Was this helpful?
The capital the first word, go run, environment, bin, src, go build, creating virtual env in go, why go (garbage collection), compilation, go offline documentation,
Last updated
Was this helpful?
Packages: In go, everything is in package, your main code is named as package main ( see hello.go )and there can be only one main package inside the working directory.
The list of packages offered by Go can be found .
Main package is starting point for a program and it import packages from import path fmt. The name of the package name is the last name of import path for example in case of math/rand, rand will be the name of the package.
Import: you either import built-in package or from third party. In anyway a package can be imported independently or as factored method.