tidyProviders

package
v0.0.0-...-93da496 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Tidiers = make(TidyProviders)

Functions

func ProcessRegexps

func ProcessRegexps(u string, m []string, t []string) (string, error)

func RegisterTidyProvider

func RegisterTidyProvider(name string, initer TidyProviderInitializer)

Types

type Null

type Null struct {
	// contains filtered or unexported fields
}

func (*Null) GetURLMatch

func (n *Null) GetURLMatch(s string) (bool, error)

GetTidyMatch gets an array of regex match strings

func (*Null) TidyURL

func (n *Null) TidyURL(s string) (string, error)

TidyURL performs the actual tidying of the URL

type TidyProvider

type TidyProvider interface {
	TidyURL(string) (string, error)
	GetURLMatch(string) (bool, error)
	GetRegexps() ([]string, []string, error)
}

type TidyProviderInitializer

type TidyProviderInitializer func(map[string]string) (*TidyProviderInstance, error)

type TidyProviderInstance

type TidyProviderInstance struct {
	TidyProvider
}
var TidyProviderNull TidyProviderInstance

func InitProvider

func InitProvider(_ map[string]string) (*TidyProviderInstance, error)

initTidy initializes a tidy provider for use

type TidyProviders

type TidyProviders = map[string]*TidyProviderInstance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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