Created
November 9, 2018 18:42
-
-
Save javi830810/68ae7da7e54330ec9dd71660381e727c 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