Skip to content

Instantly share code, notes, and snippets.

@jnriver
jnriver / default.go
Created February 19, 2014 08:55
beego中获取 GET 方法下的 URL
package controllers
import (
"fmt"
"github.com/astaxie/beego"
)
type MainController struct {
beego.Controller
}
@jnriver
jnriver / request.go
Created February 18, 2014 07:46
Go set http request header
package main
import (
"net/http"
)
func main() {
client := &http.Client{}
reqest, _ := http.NewRequest("GET", "http://localhost:9090", nil)
[
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" },
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" }
]