01 2015 档案

摘要:gethash key table &optional default [Function] 这个函数的作用是在 table 中查找 key ,然后返回关联的 value,如果没有找到对应的key就返回默认值 remhash key table [Function] 删除table中有关联... 阅读全文
posted @ 2015-01-26 16:12 yumuxu 阅读(341) 评论(0) 推荐(0)
摘要://type:interface value:sturctfunc PrintStruct(t reflect.Type, v reflect.Value, pc int) { fmt.Println("") for i := 0; i < t.NumField(); i++ { ... 阅读全文
posted @ 2015-01-24 17:31 yumuxu 阅读(3284) 评论(0) 推荐(0)
摘要:1 package main 2 3 import ( 4 "fmt" 5 "reflect" 6 ) 7 8 const ( 9 cmask = 12710 )11 12 func main() {13 var u uint814 u = 2215 ... 阅读全文
posted @ 2015-01-08 15:16 yumuxu 阅读(186) 评论(0) 推荐(0)
摘要:1 // golang 查看变量的类型 2 // 1.switch 中使用i.(type) 3 // 2.使用反射 reflect.TypeOf(i) 4 package main 5 6 import ( 7 "fmt" 8 "reflect" 9 )10 11 func Us... 阅读全文
posted @ 2015-01-07 14:26 yumuxu 阅读(445) 评论(0) 推荐(0)
摘要:os.uname()Returns information identifying the current operating system. The return value is an object with five attributes:sysname- operating system n... 阅读全文
posted @ 2015-01-02 18:46 yumuxu 阅读(1210) 评论(0) 推荐(0)