Skip to content

Instantly share code, notes, and snippets.

@mastern2k3
Created October 9, 2019 20:25
Show Gist options
  • Select an option

  • Save mastern2k3/f14ae2afef17111b7b6325dbfc758bf2 to your computer and use it in GitHub Desktop.

Select an option

Save mastern2k3/f14ae2afef17111b7b6325dbfc758bf2 to your computer and use it in GitHub Desktop.

Revisions

  1. mastern2k3 created this gist Oct 9, 2019.
    28 changes: 28 additions & 0 deletions compare_test.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    package main

    import "fmt"

    type Lol struct {
    a,b,c int
    d string
    }

    func main() {
    var a interface{} = Lol{}
    var b interface{} = Lol{}

    fmt.Printf("%v\n", a == b)
    fmt.Printf("%T, %T\n", a, &b)

    j := &b

    fmt.Printf("%v, %T\n", j, j)

    k := &j

    fmt.Printf("%v, %T\n", k, k)

    var lol *****int

    fmt.Printf("%v, %T\n", lol, lol)
    }