Go Package, import and visibility - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
Go Package

Go Package, import and visibility

Go Package, import, and visibility

Packages

Packages are used to categorize our program so that it can be easy to maintain. Every go-file belongs to some package. Each Go application must have "main" package so that it can be compiled.
An application can consist of different packages. Many different .go file can belong to one main package.
We can save Go program by any name but it must have main package. The package name should be written in lowercase letters.
If a package is changed and recompiled, all the client programs that use this package must be recompiled too!

Import

A Go program is linked to different packages through the import keyword.
The package names are enclosed within double quotes "". Import loads the public declarations from the compiled package, it does not insert the source code.

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.