随笔分类 -  golang

摘要:https://golangbyexample.com/go-mod-sum-module/ Understanding go.sum and go.mod file in Go (Golang) – Welcome To Golang By Example https://golangbyexam 阅读全文
posted @ 2018-09-12 08:56 papering 阅读(1288) 评论(0) 推荐(0)
摘要:这种实现方式比使用 += 要更节省内存和 CPU,尤其是要串联的字符串数目特别多的时候。 阅读全文
posted @ 2018-09-11 01:29 papering 阅读(272) 评论(0) 推荐(0)
摘要:小结: 1、 在图 7.3 的第一幅图中: var p *[]int = new([]int) // *p == nil; with len and cap 0 p := new([]int) 在第二幅图中, p := make([]int, 0) ,切片 已经被初始化,但是指向一个空的数组。 以上 阅读全文
posted @ 2018-09-11 01:29 papering 阅读(384) 评论(0) 推荐(0)
摘要:Go语言函数类型实现接口——把函数作为接口来调用 http://c.biancheng.net/view/58.html 函数和其他类型一样都属于“一等公民”,其他类型能够实现接口,函数也可以,本节将对结构体与函数实现接口的过程进行对比。首先给出本节完整的代码: package main impor 阅读全文
posted @ 2018-09-05 17:49 papering 阅读(954) 评论(0) 推荐(0)
摘要:package mainimport ( "fmt" "github.com/gocolly/colly" "regexp" "strings" "github.com/mongodb/mongo-go-driver/mongo" "github.com/mongodb/mongo-go-driver/bson" "context" "log" "gopkg... 阅读全文
posted @ 2018-09-05 11:35 papering 阅读(375) 评论(0) 推荐(0)
摘要:GOLANG 1.9 语言规范 - CSDN博客 https://blog.csdn.net/libing_thinking/article/details/77671607 阅读全文
posted @ 2018-09-05 10:36 papering 阅读(162) 评论(0) 推荐(0)
摘要:121212123123412312340x5211e8123450x5211e8123450x5211e81234560x5211e812345612345670x5211e8123456 阅读全文
posted @ 2018-09-04 19:33 papering 阅读(237) 评论(0) 推荐(0)
摘要:Configuration | Colly http://go-colly.org/docs/introduction/configuration/ 阅读全文
posted @ 2018-09-04 11:18 papering 阅读(132) 评论(0) 推荐(0)
摘要:random delay | Colly http://go-colly.org/docs/examples/random_delay/ 阅读全文
posted @ 2018-09-04 11:17 papering 阅读(258) 评论(0) 推荐(0)
摘要:https://github.com/PuerkitoBio/goquery#apipackage mainimport ( "fmt" "log" "net/http" "github.com/PuerkitoBio/goquery")/*2018-08-30 11:54:44document.getElementsByClassName("app-news-detail__... 阅读全文
posted @ 2018-08-31 16:15 papering 阅读(465) 评论(0) 推荐(0)
摘要:[root@t ~]# go get github.com/aliyun/aliyun-sts-go-sdk/sts# github.com/aliyun/aliyun-sts-go-sdk/sts/home/goDEV/src/github.com/aliyun/aliyun-sts-go-sdk 阅读全文
posted @ 2018-08-31 00:20 papering 阅读(1602) 评论(0) 推荐(0)
摘要:https://godoc.org/text/template GoDoc Home About </form> GoDoc Home About </form> Home About Go: text/templateIndex | Examples | Files | Directories p 阅读全文
posted @ 2018-08-30 14:44 papering 阅读(264) 评论(0) 推荐(0)
摘要:the-way-to-go_ZH_CN/09.5.md at master · Unknwon/the-way-to-go_ZH_CN https://github.com/Unknwon/the-way-to-go_ZH_CN/blob/master/eBook/09.5.md package m 阅读全文
posted @ 2018-08-30 10:51 papering 阅读(307) 评论(0) 推荐(0)
摘要:https://mp.weixin.qq.com/s/MqPm7QH3_D9roVkpTs9Xpw 谈谈Go的并发安全相关 原创 歪鼻子 歪鼻子 2020-12-27 package main import "fmt" func main() { var ch1 chan bool ch1 = ma 阅读全文
posted @ 2018-08-29 19:09 papering 阅读(531) 评论(0) 推荐(0)
摘要:src/github.com/mongodb/mongo-go-driver/mongo/cursor.go 阅读全文
posted @ 2018-08-28 16:57 papering 阅读(680) 评论(0) 推荐(0)
摘要:https://github.com/stretchr/testify Testify - Thou Shalt Write Tests Go code (golang) set of packages that provide many tools for testifying that your 阅读全文
posted @ 2018-08-28 16:29 papering 阅读(355) 评论(0) 推荐(0)
摘要:Share Memory By Communicating - The Go Programming Language https://golang.google.cn/doc/codewalk/sharemem/ One suggestion (made by Rob Pike) for conc 阅读全文
posted @ 2018-08-27 10:16 papering 阅读(214) 评论(0) 推荐(0)
摘要:Configuration | Colly http://go-colly.org/docs/introduction/configuration/ 阅读全文
posted @ 2018-08-23 17:15 papering 阅读(180) 评论(0) 推荐(0)
摘要:Scraping Framework for Golang http://go-colly.org/ https://github.com/gocolly/colly 阅读全文
posted @ 2018-08-23 17:13 papering 阅读(401) 评论(0) 推荐(0)
摘要:Go by Example 中文:Base64编码 https://books.studygolang.com/gobyexample/base64-encoding/ 阅读全文
posted @ 2018-08-23 11:14 papering 阅读(349) 评论(0) 推荐(0)