saUrl

package
v0.0.0-...-b2602dc Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultUriRoot

func AddDefaultUriRoot(s string) string

func AddUriRoot

func AddUriRoot(s string, style OssImgStyle) string

func AppendQuery

func AppendQuery(urlStr string, query map[string]string) string

AppendQuery uri后面拼接query参数

func ConnPath

func ConnPath(r string, paths ...string) (full string)

ConnPath 返回结果是: /r/path

func ConnectUri

func ConnectUri(host string, paths ...string) string

ConnectUri host如果不包含http开头,则直接返回 返回格式:http://xxxx/xxx

func DeleteUriRoot

func DeleteUriRoot(s string) string

func Init

func Init(domains string, styleAry []string)

Init @Description: 初始化 @param domains 多个域名,分号隔开。第一个为默认输出的域名,其他域名在删除时会自动删除 @param styleAry 样式组,删除时会自动移除

func QueryDecode

func QueryDecode(s string) string

QueryDecode 对字符串进行query解码

func QueryEncode

func QueryEncode(s string) string

QueryEncode 将字符串进行query编码

func QueryFromMap

func QueryFromMap(m map[string]string) string

QueryFromMap query & map 互转

func QueryToMap

func QueryToMap(urlStr string) map[string]string

Types

type OssImgStyle

type OssImgStyle int8
const (
	NullImgStyle OssImgStyle = iota
	DefaultImgStyle
	SmallImgStyle
	CoverImgStyle
	ImgTxtImgStyle
	BannerImgStyle
)

Jump to

Keyboard shortcuts

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