lab114

command
v0.0.0-...-f10d331 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 2 Imported by: 0

README

得到完整url

注意点

  • golang里面不能直接得到完成的链接,需要自己来拼接出完整的链接
  • 这里是通过request.TLS是否为空来判断是http还是https的,为空的时候是http

运行结果

先访问http://localhost:9090/index?id=1

Imgur

参考资料

http://www.01happy.com/golang-get-full-url/

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL