Created
November 9, 2018 18:41
-
-
Save javi830810/9138022a2d1fe3302e94e0c391d8bdee 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