随笔 - 337  文章 - 5  评论 - 3  阅读 - 39万
01 2022 档案
go 管道类型,双向或单向
摘要:package main import ( "fmt" "sync" "time" ) var wggg sync.WaitGroup //申明管道类型 queue <-chan string queue 是管道名称 <-chan 管道类型 单向管道还是双向管道 string 是申明管道中传输的数据 阅读全文
posted @ 2022-01-29 11:11 kevin_yang123 阅读(175) 评论(0) 推荐(0) 编辑
go 管道关闭和循环使用
摘要:package main import ( "fmt" "sync" "time" ) /* channel提供了一种通信机制 定向 消息队列 */ var wgt sync.WaitGroup //消费者 func cousumer(queue chan string){ defer wgt.Do 阅读全文
posted @ 2022-01-29 10:26 kevin_yang123 阅读(350) 评论(0) 推荐(0) 编辑
go 管道学习思考
摘要:package main import ( "fmt" "sync" ) /* channel提供了一种通信机制 定向 消息队列 */ var wgt sync.WaitGroup //消费者 func cousumer(queue chan string){ defer wgt.Done() da 阅读全文
posted @ 2022-01-29 10:01 kevin_yang123 阅读(24) 评论(0) 推荐(0) 编辑
go 协程抓取网站图片
摘要:package main import ( "fmt" "io/ioutil" "net/http" "os" "regexp" "strconv" "strings" "sync" "time" ) //并发抓思路 //1.初始化数据管道 //2.爬虫写出:26个协程向管道中添加图片连接 //3. 阅读全文
posted @ 2022-01-28 10:27 kevin_yang123 阅读(51) 评论(0) 推荐(0) 编辑
go 抓取页面邮箱
摘要:package main import ( "flag" "fmt" "io/ioutil" "net/http" "regexp" ) var ( QQEmall=`\d+@qq.com` reEmall=`\w+@\w+\.\w` url string ) func GetEmall(url s 阅读全文
posted @ 2022-01-27 13:59 kevin_yang123 阅读(74) 评论(0) 推荐(0) 编辑
git创建新分支
摘要:1.第一步是在本地创建分支 需要在master下做分支,就需要checkout到master分支 同理,如果想在test测试分支上再做一个分支就在test上创建 git branch -b testnew(分支名称) 等价于 git branch testnew git checkout testn 阅读全文
posted @ 2022-01-21 09:56 kevin_yang123 阅读(6342) 评论(0) 推荐(0) 编辑
go 参数校验,并且返回翻译成中文提示
摘要:package main import ( "errors" "fmt" "github.com/gin-gonic/gin" "github.com/go-playground/locales/zh" ut "github.com/go-playground/universal-translato 阅读全文
posted @ 2022-01-17 18:10 kevin_yang123 阅读(214) 评论(0) 推荐(0) 编辑
goland 数据处理切分的函数
摘要:数组以,拼接 strings.Join("str",",") 字符串以,拆分为数组 strings.Split(“str”,",") 阅读全文
posted @ 2022-01-11 16:35 kevin_yang123 阅读(53) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示