随笔分类 -  golang

摘要:假如请的URL是 /info/hello?key=name "url": ctx.Request.URL. 显示一个对象 "uri": ctx.Request.RequestURI, 显示是的全路径 /info/hello?key=name "path": ctx.Request.URL.Path, 阅读全文
posted @ 2023-03-12 19:07 火鸟网络 阅读(51) 评论(0) 推荐(0)
摘要:t0 := template.New("root") t0.New("header").Parse("header") t0.New("footer").Parse("f0") t1 := template.New("") t1.Parse("footer") t0.AddParseTree("fo 阅读全文
posted @ 2023-01-13 10:43 火鸟网络 阅读(65) 评论(0) 推荐(0)
摘要:bufio,是golang层的缓冲区,io层,是电脑系统对接硬盘的操作, bytes.Buffer 是一个可写可读的容器 io.Reader 和 io.Writer 是接口,把对应的对象传入才可以操作具体方法! 阅读全文
posted @ 2020-12-04 17:36 火鸟网络 阅读(840) 评论(0) 推荐(0)