mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-23 06:03:07 +03:00
EDOUBLEDSPACE
My *fake* ocd kicked in
This commit is contained in:
parent
dc2487aced
commit
0846eaa0e7
@ -275,7 +275,7 @@ func (p pair) String() string { // p is called the "receiver"
|
||||
}
|
||||
|
||||
func learnInterfaces() {
|
||||
// Brace syntax is a "struct literal." It evaluates to an initialized
|
||||
// Brace syntax is a "struct literal". It evaluates to an initialized
|
||||
// struct. The := syntax declares and initializes p to this struct.
|
||||
p := pair{3, 4}
|
||||
fmt.Println(p.String()) // Call String method of p, of type pair.
|
||||
|
Loading…
Reference in New Issue
Block a user