internal

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Pattern = "#|%|&|\\{|\\}|\\\\|<|>|\\*|\\?|/|\\$|!|'|\"|\\:|@|\\+|`|\\||="
View Source
const SourceFilePath = "testdata/src.htm"
View Source
const (
	SourceURL = "https://www.mtu.edu/umc/services/websites/writing/characters-avoid"
)

Variables

View Source
var ForbiddenChars = []string{
	"#",
	"%",
	"&",
	"{",
	"}",
	"\\",
	"<",
	">",
	"*",
	"?",
	"/",
	"$",
	"!",
	"'",
	"\"",
	":",
	"@",
	"+",
	"`",
	"|",
	"=",
}
View Source
var ForbiddenRules = []Rule{
	{Symb: "#", Desc: "pound"},
	{Symb: "%", Desc: "percent"},
	{Symb: "&", Desc: "ampersand"},
	{Symb: "{", Desc: "left curly bracket"},
	{Symb: "}", Desc: "right curly bracket"},
	{Symb: "\\", Desc: "back slash"},
	{Symb: "<", Desc: "left angle bracket"},
	{Symb: ">", Desc: "right angle bracket"},
	{Symb: "*", Desc: "asterisk"},
	{Symb: "?", Desc: "question mark"},
	{Symb: "/", Desc: "forward slash"},
	{Symb: "blank", Desc: "spaces"},
	{Symb: "$", Desc: "dollar sign"},
	{Symb: "!", Desc: "exclamation point"},
	{Symb: "'", Desc: "single quotes"},
	{Symb: "\"", Desc: "double quotes"},
	{Symb: ":", Desc: "colon"},
	{Symb: "@", Desc: "at sign"},
	{Symb: "+", Desc: "plus sign"},
	{Symb: "`", Desc: "backtick"},
	{Symb: "|", Desc: "pipe"},
	{Symb: "=", Desc: "equal sign"},
	{Symb: "emojis", Desc: "emojis"},
	{Symb: "alt", Desc: "codes"},
}
View Source
var Specials = map[string]struct{}{
	"$":  {},
	"(":  {},
	")":  {},
	"*":  {},
	"+":  {},
	".":  {},
	":":  {},
	"?":  {},
	"[":  {},
	"\\": {},
	"]":  {},
	"^":  {},
	"{":  {},
	"|":  {},
	"}":  {},
}

Functions

func GetForbiddenChars

func GetForbiddenChars() (out []string)

func Map

func Map[Have, Want any](fn func(Have) Want, args ...Have) []Want

Types

type Rule

type Rule struct {
	Symb string `json:"symb"`
	Desc string `json:"name"`
}

func GetForbiddenRules

func GetForbiddenRules() (out []Rule)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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