github.com/EngineerKamesh/gofullstack@v0.0.0-20180609171605-d41341d7d4ee/volume1/section2/greetingspackage/gophergreeting.go (about) 1 package greetingspackage 2 3 import "fmt" 4 5 var MagicNumber int 6 7 // This is an exported function and can be called outside the package 8 func GopherGreetings() { 9 10 fmt.Println("A very jolly hello my fellow gophers! I'm printing from the GopherGreetings() function") 11 // Now we're calling an unexported package, because this function 12 // is within the same package, we have access to call it 13 printGreetingsUnexported() 14 15 } 16 17 // Example of a Packages init() function 18 func init() { 19 20 MagicNumber = 108 21 22 }