+ -

Go语言的Web开发框架 Web.Go

时间:2011-02-25

来源:cnblogs

在手机上看
手机扫描阅读

  Web.Go 跟 web.py 类似,但使用的是 Go 编程语言实现的 Web 应用开发框架。

  安装方法:

git clone git://github.com/hoisie/web.go.git
cd web.go
make && make install

  示例代码:

package main

import (
"web"
)

func hello(val string) string { return "hello "+val }

func main(){
web.Get("/(.*)", hello)
web.Run("0.0.0.0:9999")
}

  编译方法:8g hello.go && 8l -o hello hello.8 && ./hello

  测试方法:http://localhost:9999/world


  

热门下载

更多