我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何根据请求URL使用golang GIN路由HTTP请求

For example there are two url

http://user1?test

http://user1?test1

I want to route "http://user1?test" to func1() and http://user1?test1 to func2().

so i have used gin router for routing the request. its like router.POST("/user1?test",func()) but GIN is considering till "/user1" its not considering where "?" comes into picture. In short is it like GIN only considers "/" only not "?".

近期文章

  • 如何在源文件中设置构建标记
  • GoLang字符串为空
  • 如何在Ubuntu上的go 1.11中设置GOPATH环境变量? 我必须编辑什么文件?
  • 使用Mysql在Go中创建父子嵌套的json
  • Chrome文件浏览器-访问完整路径
  • os.Read()工作如何? Golang
  • 如何在Golang中创建结构运行时
  • 使用GolLand时无法在CMD终端上运行同一程序,但运行正常
  • 紧急:运行时错误:索引超出范围[已恢复]
  • Golang运行时错误:索引超出范围
  • 如何用golang中的字符串制作预告片?
  • 我可以在切片中内联声明接口列表吗?
  • 隐式依赖关系来查找go stdlib软件包
  • Golang mysql select *语句仅返回第一个值
  • 如何发出HTTP请求以从Clickhouse数据库获取数据
  • jsonpb,为什么将int64解码为json,结果是字符串。 就像int64 str = 10-> str:“ 10”
  • 如何将Go与MySQL连接以保存数据并再次渲染? [关闭]
  • 蜜蜂不可执行
  • 使用字符串作为结构值
  • 在go中处理POST请求

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华