types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublicPath

type PublicPath string

PublicPath represents the path to the public directory of a WordPress site. We use this type to consistently ensure that the path ends with a slash when used as a string.

func (PublicPath) String

func (p PublicPath) String() string

type SiteUrl

type SiteUrl string

SiteUrl represents a URL to a WordPress site. We use this type to consistently ensure that the URL is valid.

func NewSiteUrl

func NewSiteUrl(input string) (SiteUrl, error)

NewSiteUrl is a constructor that returns a SiteUrl. It returns an error if the URL is invalid.

func (SiteUrl) Domain

func (u SiteUrl) Domain() string

Domain returns the domain of the SiteUrl without the protocol. For example, if the SiteUrl is https://example.com, this method will return example.com.

Jump to

Keyboard shortcuts

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