acronym

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package acronym handles the initialisms and acronyms frequently used by the groups.

Index

Constants

This section is empty.

Variables

View Source
var ErrName = errors.New("group name cannot be empty")

Functions

func Fix added in v1.9.0

func Fix(db *sql.DB) (int64, error)

Fix deletes any malformed initialisms in the database and returns the number of rows affected.

func Get

func Get(db *sql.DB, s string) (string, error)

Get a group's initialism or acronym. For example "Defacto2" would return "df2".

func Trim

func Trim(s string) string

Trim removes a (bracketed initialism) from s. For example "Defacto2 (DF2)" would return "Defacto2".

Types

type Group

type Group struct {
	Name       string
	Initialism string
}

func (*Group) Get

func (g *Group) Get(db *sql.DB) error

Get the initialism for the named group.

Jump to

Keyboard shortcuts

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