在编程的时候,连接数据库进行存储操作是必不可少的,这里我们去连接redis数据库 第三方开源库 go get -v github.com/garyburd/redigo/redis 这种第三方的包没有像是之前那种的文档可以查看,不过我们可以通过idea查看 随便输入下包名加点 package main i...
# sudo apt-get install -y mongodb-org Reading package lists--- Done Building dependency tree ? ? ?? Reading state information--DoneSome packages could not be installed. This may mean that you have requested an impossible situation or if you are using the...
Golang中结构体与json格式字符串可通过系统库encoding/json完成 struct转json字符串 通过json.Marshal将结构体转换为字符串输出。 package main import ( "encoding/json" "fmt" ) type Person struct { Name string Age int From string } func main() { p...