上一页 1 ··· 108 109 110 111 112 113 114 115 116 ··· 234 下一页

2019年9月9日

go使用go-redis操作redis 连接类型,pipline, 发布订阅

摘要: 内容: 一 . 客户端Client(普通模式,主从模式,哨兵模式)二. conn连接(连接, pipline, 发布订阅等)三. 示例程序(连接, pipline, 发布订阅等)客户端Client 普通模式的客户端go redis依据用途提供了多种客户端创建的函数, 如下: func NewClie 阅读全文

posted @ 2019-09-09 17:54 ExplorerMan 阅读(6075) 评论(0) 推荐(0)

聊聊GO-REDIS的一些高级用法

摘要: 1. 前言 说到Golang的Redis库,用到最多的恐怕是redigo 和 go-redis。其中 redigo 不支持对集群的访问。本文想聊聊go-redis 2个高级用法 2. 开启对Cluster中Slave Node的访问 在一个负载比较高的Redis Cluster中,如果允许对slav 阅读全文

posted @ 2019-09-09 16:18 ExplorerMan 阅读(471) 评论(0) 推荐(0)

Golang- import 导入包的几种方式:点,别名与下划线

摘要: 包的导入语法 在写Go代码的时候经常用到import这个命令用来导入包文件,看到的方式参考如下: import( "fmt" ) 然后在代码里面可以通过如下的方式调用 fmt.Println("hello world") 上面这个fmt是Go语言的标准库,他其实是去GOROOT下去加载该模块,当然G 阅读全文

posted @ 2019-09-09 11:36 ExplorerMan 阅读(11646) 评论(0) 推荐(1)

2019年9月6日

ApiDoc 后端接口注释文档的使用

摘要: 前端和后端注释文档生成 前端和后端的 函数及api 说明文档生成总结,持续更新中 by Qzx 参考网址 jsDoc - 中文说明 jsDoc 使用教程 后台接口文档生成器 - APIDOC官网 apiDoc - 中文说明 apiDoc的使用教程 一、安装 二、apidoc 常用命令说明 三、具体使 阅读全文

posted @ 2019-09-06 16:45 ExplorerMan 阅读(513) 评论(0) 推荐(0)

接口文档神器之apidoc

摘要: //@desn:apidoc linux环境 windows环境使用 //@desn:码字不宜,转载请注明出处 //@author:张慧源 <turing_zhy@163.com> //@date:2018/5/6 正文: windows版安装: 1.安装nodejs (nodejs环境) 32 位 阅读全文

posted @ 2019-09-06 16:45 ExplorerMan 阅读(337) 评论(0) 推荐(0)

2019年9月5日

Golang 数组和切片

摘要: 数组 数组是类型相同的元素的集合。例如,整数 5, 8, 9, 79, 76 的集合就构成了一个数组。Go不允许在数组中混合使用不同类型的元素(比如整数和字符串)。 声明 有很多声明数组的方式,让我们一个一个地介绍。 var a [3]int 声明了一个长度为 3 的整型数组。数组中的所有元素都被自 阅读全文

posted @ 2019-09-05 18:19 ExplorerMan 阅读(307) 评论(0) 推荐(0)

go切片展开

摘要: 可以使用 ... 操作符将一个切片追加到另一个切片末尾: 上面的程序中,在第10行将 fruits 追加到 veggies 并赋值给 food。...操作符用来展开切片。程序的输出为:food: [potatoes tomatoes brinjal oranges apples]。 阅读全文

posted @ 2019-09-05 18:17 ExplorerMan 阅读(2076) 评论(0) 推荐(0)

2019年9月4日

Go的json解析:Marshal与Unmarshal

摘要: 简介Json(Javascript Object Nanotation)是一种数据交换格式,常用于前后端数据传输。任意一端将数据转换成json 字符串,另一端再将该字符串解析成相应的数据结构,如string类型,strcut对象等。 go语言本身为我们提供了json的工具包”encoding/jso 阅读全文

posted @ 2019-09-04 19:42 ExplorerMan 阅读(567) 评论(0) 推荐(0)

golang depth read map

摘要: Foreword: I optimized and improved the below solution, and released it as a library here: github.com/icza/dyno. The cleanest way would be to create pr 阅读全文

posted @ 2019-09-04 19:32 ExplorerMan 阅读(411) 评论(0) 推荐(0)

golang 多级json转map

摘要: func main() { jsonStr := `{"isSchemaConforming":true,"schemaVersion":0,"unknown.0":[{"email_address":"test1@uber.com"},{"email_address":"test2@uber.com"}]}` dynamic := make(map[string]interf... 阅读全文

posted @ 2019-09-04 19:14 ExplorerMan 阅读(3324) 评论(0) 推荐(0)

上一页 1 ··· 108 109 110 111 112 113 114 115 116 ··· 234 下一页

导航