• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
huoppo
博客园 首页 新随笔 联系 订阅 订阅 管理

2018年12月7日

泊爷带你学go -- 经典的继承与接口 简直吊炸天 !
摘要: package main import ( "fmt" ) type TeamBase struct { m_TeamId uint64 m_Rid uint32 m_RoomRule uint32 m_Players []uint64 } type TeamInt interface { Init() CreateTeam(accountId uint64,... 阅读全文
posted @ 2018-12-07 17:04 huoppo 阅读(193) 评论(1) 推荐(0)
 
泊爷带你学go -- 反射的经典玩法
摘要: package main import ( "fmt" "reflect" ) type order struct { ordId int customerId int } func createQuery(q interface{}) { t := reflect.TypeOf(q) //----NB啊 if t.String() == "main.order" ... 阅读全文
posted @ 2018-12-07 15:38 huoppo 阅读(179) 评论(0) 推荐(0)
 
泊爷带你学go -- redis连接池的操作
摘要: package main import ( "common" "fmt" "proto" "strconv" "time" "github.com/garyburd/redigo/redis" "github.com/gogo/protobuf/proto" ) type RedisHelper struct { redisClie... 阅读全文
posted @ 2018-12-07 14:33 huoppo 阅读(1096) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3