Documentation ¶
Overview ¶
Package groups deals with group names and their initialisms.
Index ¶
- Variables
- func Contains(x string, sorted []string) bool
- func Count(db *sql.DB, name string) (int, error)
- func Cronjob(db *sql.DB, w, dest io.Writer, tag string, force bool) error
- func Exact(db *sql.DB, name string) (int, error)
- func Fix(db *sql.DB, w io.Writer) error
- func Format(name string) string
- func Initialism(db *sql.DB, name string) (string, error)
- func List(db *sql.DB, w io.Writer) ([]string, int, error)
- func Match(db *sql.DB, w io.Writer, maxCount int) error
- func Slug(s string) string
- func SwapAll(group, str, swap string) string
- func SwapNumeral(group string, i int) string
- func SwapOne(group, str, swap string) string
- func SwapOrdinal(group string, i int) string
- func SwapPrefix(group, prefix, swap string) string
- func SwapSuffix(group, suffix, swap string) string
- func Tags() []string
- func TrimSP(name string) (string, string, string)
- func Update(db *sql.DB, newName, group string) (int64, error)
- func Variations(db *sql.DB, name string) ([]string, error)
- type Request
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Contains ¶ added in v1.10.0
Contains returns true whenever sorted contains x. The slice value must be stored in increasing order.
func Count ¶ added in v1.10.2
Count returns the number of file entries associated with a named group.
func Exact ¶ added in v1.10.0
Exact returns the number of file entries that match an exact named filter. The casing is ignored, but comma separated multi-groups are not matched to their parents. The name "tristar" will match "Tristar" but will not match records using "Tristar, Red Sector Inc".
func Initialism ¶
Initialism returns a named group initialism or acronym.
func Match ¶ added in v1.11.0
Match scans over the groups and attempts to match possible misnamed duplicates. The results are printed to stdout in realtime. maxCount is intended for tests and will limit the number of groups to scan.
func SwapAll ¶ added in v1.10.0
SwapAll finds all occurrences of str within a group name and replaces it with swap.
func SwapNumeral ¶ added in v1.10.0
SwapNumeral finds any occurrences of i within a group name and swaps it for a cardinal number.
func SwapOne ¶ added in v1.10.0
SwapOne finds the first occurrence of str within a group name and replaces it with swap.
func SwapOrdinal ¶ added in v1.10.0
SwapOrdinal finds any occurrences of i within a group name and swaps it for a ordinal number.
func SwapPrefix ¶ added in v1.10.0
SwapPrefix replaces the prefix value at the start of a group name and replaces it with swap. An empty string is returned if the prefix does not exist in the name.
func SwapSuffix ¶ added in v1.10.0
SwapSuffix replaces the suffix value at the end of a group name and replaces it with swap. An empty string is returned if the suffix does not exist in the name.
func TrimSP ¶ added in v1.10.0
TrimSP removes all spaces from a named group, BBS or FTP site. The first string returns the spaceless name. The second string returns a spaceless name appended with the plural "s". The third string is spaceless name appended with the plural "z".
Types ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
acronym
Package acronym handles the initialisms and acronyms frequently used by the groups.
|
Package acronym handles the initialisms and acronyms frequently used by the groups. |
filter
Package filter returns the groups based on a role or activity filter.
|
Package filter returns the groups based on a role or activity filter. |
rename
Package rename handles the renaming and formatting of the group title.
|
Package rename handles the renaming and formatting of the group title. |
request
Package request obtains and writes the data of the group to various formats.
|
Package request obtains and writes the data of the group to various formats. |