小编Sha*_*esh的帖子

如何在golang GET请求中转义空格字符

我想在golang中使用net/http包在get请求中发送文本字符串.但是我无法知道如何做到这一点.就像我想要点击以下网址:

"http://api.example.com/tutor?message=how can I do this"
Run Code Online (Sandbox Code Playgroud)

请让我知道我该怎么做.

http go

4
推荐指数
1
解决办法
3273
查看次数

如何限制用golang编写的web服务器来允许特定地址而不是模式?

我用的时候

http.HandleFunc("/", serveRest)  //serveRest is the method to handle request
http.ListenAndServe("localhost:4000", nil)
Run Code Online (Sandbox Code Playgroud)

它将接受所有请求"/".如何限制它仅用于"localhost:4000"代替每个地址"localhost:4000/*"

你们可以给我一个很好的Go教程吗?

http go url-pattern server

2
推荐指数
1
解决办法
974
查看次数

使用golang将字节数组转换回文件

有没有办法将字节数组写入文件?我有文件名和文件扩展名(如temp.xml).

decode file go

-1
推荐指数
1
解决办法
4058
查看次数

标签 统计

go ×3

http ×2

decode ×1

file ×1

server ×1

url-pattern ×1