gourl

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 2 Imported by: 2

README

Golang Url

📦 Golang Url

godoc goproxy.cn goreportcard.com deps.dev

安装

go get -v -u go.dtapp.net/gourl

Documentation

Index

Constants

View Source
const Version = "1.0.0"

Variables

This section is empty.

Functions

func DeCode

func DeCode(s string) string

DeCode 解码

func LenCode

func LenCode(s string) string

LenCode 编码

func ParseQuery

func ParseQuery(s string) map[string][]string

ParseQuery 获取URL参数 https://studygolang.com/articles/2876

func UriFilterExcludeQueryString

func UriFilterExcludeQueryString(uri string) string

UriFilterExcludeQueryString 过滤掉url中的参数

Types

type ResponseUrlParse

type ResponseUrlParse struct {
	Uri      string `json:"uri"`       // URI
	Urn      string `json:"urn"`       // URN
	Url      string `json:"url"`       // URL
	Scheme   string `json:"scheme"`    // 协议
	Host     string `json:"host"`      // 主机
	Hostname string `json:"hostname"`  // 主机名
	Port     string `json:"port"`      // 端口
	Path     string `json:"path"`      // 路径
	RawQuery string `json:"raw_query"` // 参数 ?
	Fragment string `json:"fragment"`  // 片段 #
}

ResponseUrlParse 返回参数

func UriParse

func UriParse(input string) (resp ResponseUrlParse)

UriParse 解析URl

Jump to

Keyboard shortcuts

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