Packages
Every Go program is made up of packages.
Programs start running in package
main
.This program is using the packages with import paths
"fmt"
and"math"
.By convention, the package name is the same as the last element of the import path.
Example:
package main
import (
"fmt"
"math"
)
func main() {
fmt.Println("Happy", math.Pi, "Day")
}
output :
Happy 3.141592653589793 Day
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDelete