Skip to content

Instantly share code, notes, and snippets.

@miss-invincible
Created January 14, 2020 07:02
Show Gist options
  • Save miss-invincible/c6f98bd3059a943974049d1f34f47a4e to your computer and use it in GitHub Desktop.
Save miss-invincible/c6f98bd3059a943974049d1f34f47a4e to your computer and use it in GitHub Desktop.
Difference between reflect.kind and reflect.TypeOf
package main
import (
"fmt"
"reflect"
)
func main() {
type shivangi int32
var a shivangi = 3
fmt.Println(reflect.ValueOf(a), reflect.Kind(a), reflect.TypeOf(a))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment