interface{} 指针 bool 取值

package main
package main

import (
    "fmt"
    "reflect"
)

func main() {
    var a interface{} = false
    aa := &a
    vi := reflect.ValueOf(*aa) 
  
    fmt.Printf("sdsd = %+v\n",vi.Type())
    fmt.Printf("sdsd12 = %+v\n",vi.Interface())
    fmt.Printf("aa = %+v\n",aa)
}

 



posted @ 2021-09-27 19:43  hubb  阅读(110)  评论(0编辑  收藏  举报