Created
January 14, 2020 07:02
-
-
Save miss-invincible/c6f98bd3059a943974049d1f34f47a4e to your computer and use it in GitHub Desktop.
Difference between reflect.kind and reflect.TypeOf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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