Go
go语言及第三方库使用
frank_zfh
这个作者很懒,什么都没留下…
展开
-
Go:Http服务
package main import ( “io” “net/http” ) type MyHandler struct{} func (this MyHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { io.WriteString(response, “hello原创 2017-10-20 19:08:24 · 364 阅读 · 1 评论 -
Go:Hello World
package main import ( "fmt" ) func main() { fmt.Println("hello world") }原创 2017-10-20 19:06:28 · 227 阅读 · 1 评论 -
Go:通过反射获取结构体Tag
package mainimport ( "fmt" "reflect")type Person struct { Name string `table:"person" column:"name"` Age int32 `column:"age"`}func main() { frank := Person{ "frank",原创 2017-10-20 19:03:14 · 476 阅读 · 1 评论 -
Go:日期/时间格式化
package mainimport ( "fmt" "time")func main() { //6-1-2-3(15)-4-5 var now = time.Now().Format("2006-01-02 15:04:05") fmt.Println(now)}原创 2017-10-09 23:53:43 · 673 阅读 · 0 评论 -
Go:变量定义
package mainimport( "fmt")func main() { var message string = "hello world" //var message = "hello world" //message := "hello world" fmt.Println(message)}原创 2018-01-07 20:51:28 · 227 阅读 · 0 评论