Skip to content

Instantly share code, notes, and snippets.

@yaravind
Last active December 7, 2016 19:56
Show Gist options
  • Save yaravind/d635eea45dfc771eb859666423a1e5ca to your computer and use it in GitHub Desktop.
Save yaravind/d635eea45dfc771eb859666423a1e5ca to your computer and use it in GitHub Desktop.
First Go Package & Command
package main
import (
"fmt"
"github.com/yaravind/example"
)
func main() {
fmt.Println("Example - Hello World")
fmt.Println("Hello")
fmt.Println()
fmt.Println("Example - Multiple value return from function")
n, a := example.NameAndAge()
fmt.Println(n, a)
}
package example
func NameAndAge() (string, int) {
return "Esha", 7
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment