Last active
December 7, 2016 19:56
-
-
Save yaravind/d635eea45dfc771eb859666423a1e5ca to your computer and use it in GitHub Desktop.
First Go Package & Command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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