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

浙公网安备 33010602011771号