Skip to content

Instantly share code, notes, and snippets.

@javi830810
Created November 9, 2018 18:41
Show Gist options
  • Save javi830810/9138022a2d1fe3302e94e0c391d8bdee to your computer and use it in GitHub Desktop.
Save javi830810/9138022a2d1fe3302e94e0c391d8bdee to your computer and use it in GitHub Desktop.
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