Skip to content

Instantly share code, notes, and snippets.

@shichao-an
Created May 8, 2015 00:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shichao-an/2eae3c34f717fb5bdde8 to your computer and use it in GitHub Desktop.
Save shichao-an/2eae3c34f717fb5bdde8 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"reflect"
)
func main() {
var x float64 = 3.4
fmt.Println(reflect.TypeOf(x)) // float64
fmt.Println(reflect.ValueOf(x)) // <float64 Value>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment