Created
October 12, 2019 01:50
-
-
Save lachlan-eagling/5068de70a243b3d2bcf987a83b6b9915 to your computer and use it in GitHub Desktop.
Blog - Anatomy of a Struct (Using Struct)
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
func main() { | |
user := User{ | |
firstName: "Lachlan", | |
lastName: "Eagling", | |
username: "LachlanEagling", | |
age: 7, | |
} | |
if err := user.UpdateUsername("Lachlan_E"); err != nil { | |
fmt.Println(err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment