Skip to content

Instantly share code, notes, and snippets.

@yakuter
Last active November 3, 2022 19:40
Show Gist options
  • Save yakuter/9b88461c1714aded19ef53a16da3a5f4 to your computer and use it in GitHub Desktop.
Save yakuter/9b88461c1714aded19ef53a16da3a5f4 to your computer and use it in GitHub Desktop.
Empty Struct 2
// Versiyon 2
package main
import "fmt"
type Foo struct{}
func main() {
a := &Foo{}
b := &Foo{}
fmt.Printf("%p\n", a)
fmt.Printf("%p\n", b)
fmt.Println(a == b)
}
// Output:
// 0x1003ff0d8
// 0x1003ff0d8
// true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment