Created
November 9, 2018 18:44
-
-
Save javi830810/7afacd30c7f1f0e8126e9d7e8c1afea4 to your computer and use it in GitHub Desktop.
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" | |
type User struct { | |
Name string | |
} | |
func main() { | |
u:= createUser() | |
fmt.Println(u.Name) | |
} | |
func createUser() User{ | |
user := &User { | |
Name: "Jose", | |
} | |
return *user | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment