
Go
CharlesPoletoWin
SHU
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Go语言学习笔记(1)
Go语言学习笔记 由于目前是学生身份,所以使用的是JetBrains全家桶系列,Goland 这是多处理器多Handler方式 package main import ( "fmt" "net/http" "strings" ) //多处理器多Handler type MyHandler struct { } func(m *MyHandler) ServeHTTP(w http...原创 2019-05-03 21:38:34 · 236 阅读 · 0 评论 -
Go语言学习笔记(2)
go语言学习笔记 这是go语言web项目的标准结构 引入静态资源 package main import ( "html/template" "net/http" ) func welcome(w http.ResponseWriter, r *http.Request){ t,_:=template.ParseFiles("view/index.html") t.Execute(w...原创 2019-05-03 23:57:44 · 199 阅读 · 0 评论 -
Go语言学习笔记(3)
Go语言学习笔记(3) action eq 等于 ne 不等于 lt 小于 (less than) le 小于等于 gt 大于 ge 大于等于 if else 部分 package main import ( "html/template" "net/http" ) func welcome(w http.ResponseWriter, r *http.Request){ t,_:=te...原创 2019-05-04 16:50:00 · 162 阅读 · 0 评论 -
Go语言学习笔记(4)
Go语言学习笔记(4) 文件下载 package main import ( "fmt" "html/template" "io/ioutil" "net/http" ) func download(w http.ResponseWriter, r *http.Request){ filename:=r.FormValue("filename") f,err:=ioutil.Rea...原创 2019-05-05 20:40:34 · 168 阅读 · 0 评论 -
Go语言学习笔记(5)
cookie package main import ( "html/template" "net/http" ) func welcome(w http.ResponseWriter, r *http.Request){ t,_:=template.ParseFiles("view/index.html") t.Execute(w,nil) } func setCookie(w h...原创 2019-05-08 22:08:24 · 131 阅读 · 0 评论