通用IM架构

这篇属于IM三剑客中的一篇,后面两篇主要着重介绍了MQTT协议以及MQTT Broker的Go语言实现,如果没有这类需求的话可以跳过。 Mqtt

Go Awesome

虽然网上已经有了大量的Awesome相关的资源了,这里为什么还要再来一份呢,原因是网上的虽然大而全,但是很多都是耳熟能详的库,有些库会被埋没

Go json使用的奇技淫巧

基本使用 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 package main import "encoding/json" type A struct { B int C string } func main() { buf, err := json.Marshal(A{B: 1, C: "Hello"}) if err != nil { panic(err) } println(string(buf)) } 修改结果中的key值 1 2 3 4 5 6 package main