Help us shape the future of Go! Take the 2026 Go Developer Survey

url

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BASE_URL string = "https://cdn.pixelbin.io"
View Source
var OPERTATION_SEPARATOR string = "~"
View Source
var PARAMETER_SEPARATOR string = ","
View Source
var URL_WITHOUT_ZONE string = "/([a-zA-Z0-9_-]*)/(.+)/(.*)"
View Source
var URL_WITH_ZONE string = "^/([a-zA-Z0-9_-]*)/([a-zA-Z0-9_-]{6})/(.+)/(.*)$"
View Source
var VERSION2_REGEX string = "^v[1-2]$"
View Source
var ZONE_SLUG string = "([a-zA-Z0-9_-]{6})"

Functions

func FlattenSlice

func FlattenSlice(slice []interface{}) []string

FlattenSlice flattens nested slices of string

func ObjToUrl

func ObjToUrl(obj map[string]interface{}) (string, error)

func UrlToObj

func UrlToObj(url string, opts ...UrlToObjOption) (map[string]interface{}, error)

Types

type UrlRegex added in v2.2.0

type UrlRegex struct {
	WithZone          string
	WithoutZone       string
	WithWorkerAndZone string
	WithWorker        string
}

type UrlToObjOption added in v2.2.0

type UrlToObjOption func(*urlToObjConfig)

UrlToObjOption is a functional option for configuring the UrlToObj function.

func WithCustomDomain added in v2.2.0

func WithCustomDomain(IsCustomDomain bool) UrlToObjOption

WithCustomDomain sets the IsCustomDomain field in the configuration.

Jump to

Keyboard shortcuts

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