wikidot

package
v0.9.0-rc.53 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultCategory = "_default"
)

Variables

This section is empty.

Functions

func CanonicalizeUsername

func CanonicalizeUsername(name string) string

Unlike Normalize this keeps non-Latin letters, so a Chinese name canonicalizes to itself rather than to an empty string. Every run that is neither a letter nor a number collapses, the underscore included.

func Denormalize

func Denormalize(fullName string) string

func FallbackUsername

func FallbackUsername(userID int64, suffix int) string

func NameAllowed

func NameAllowed(fullName string) bool

func Normalize

func Normalize(fullName string) string

func NormalizeDisplayName

func NormalizeDisplayName(name string) string

func ReservedUsername

func ReservedUsername(name string) bool

func Split

func Split(fullName string) (category, name string)

func SplitSiteRef

func SplitSiteRef(fullName string) (slug, name string)

SplitSiteRef reads the ":slug:category:page" form an include may use to name another wiki. A ref without the leading colon names no site and comes back whole.

Types

type DisplayNameProblem

type DisplayNameProblem int
const (
	DisplayNameOK DisplayNameProblem = iota
	DisplayNameEmpty
	DisplayNameTooLong
	DisplayNameInvisible
	DisplayNameOddSpace
	DisplayNameLeadingMark
)

func ValidateDisplayName

func ValidateDisplayName(name string) DisplayNameProblem

Jump to

Keyboard shortcuts

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