mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-07 07:16:42 +02:00
EDOUBLEDSPACE
My *fake* ocd kicked in
This commit is contained in:
@@ -275,7 +275,7 @@ func (p pair) String() string { // p is called the "receiver"
|
|||||||
}
|
}
|
||||||
|
|
||||||
func learnInterfaces() {
|
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.
|
// struct. The := syntax declares and initializes p to this struct.
|
||||||
p := pair{3, 4}
|
p := pair{3, 4}
|
||||||
fmt.Println(p.String()) // Call String method of p, of type pair.
|
fmt.Println(p.String()) // Call String method of p, of type pair.
|
||||||
|
Reference in New Issue
Block a user