随笔- 310
文章- 1
评论- 0
阅读-
85655
随笔分类 - golang
Go 是一个开源的编程语言,它能让构造简单、可靠且高效的软件变得容易
golang 构建Web服务器
摘要:main.go package main import ( "fmt" "log" "net/http" ) func loggingMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.Re
阅读全文
go template 使用
摘要:test.html <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Go Web</title> </head> <body> {{ .
阅读全文
go 实现一个简单的web服务
摘要:package main import ( "fmt" "log" "net/http" "strings" ) func sayhelloName(w http.ResponseWriter, r *http.Request) { r.ParseForm() //解析参数,默认是不会解析的 fmt
阅读全文
Go 语言环境安装
摘要:下载 https://golang.google.cn/dl/。 linux下安装 1、下载二进制包:go1.4.linux-amd64.tar.gz。 2、将下载的二进制包解压至 /usr/local目录。 tar -C /usr/local -xzf go1.4.linux-amd64.tar.
阅读全文