摘要:
reg = regexp.MustCompile(`(Abc|a7c|你好)`) fmt.Printf("%s\n", reg.ReplaceAllString(text, "**")) 其中text是从哪个字符串中替换,**代表的是要替换的内容。reg是正则 阅读全文
摘要:
import ( "io/ioutil" "log" "net/http" ) get请求: resp, err := http.Get("http://localhost:6002/baiduTrans") if err != nil { log.Fatalln(err) } //We Read 阅读全文
摘要:
import r "github.com/solos/requests" func translationPHandler(w http.ResponseWriter,rr *http.Request){ if rr.Method == "POST" { con := rr.PostFormValu 阅读全文
摘要:
get请求方式: func marixExplainPHandler(w http.ResponseWriter,rr *http.Request){ query := rr.URL.Query() id := query.Get("id")} form表单传递参数 func marixExplai 阅读全文