nomcode

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: MIT Imports: 1 Imported by: 10

Documentation

Overview

Package nomcode provides types and functions for nomenclatural codes.

Index

Constants

This section is empty.

Variables

View Source
var CodeToString = map[Code]string{
	Bacterial:         "BACTERIAL",
	Botanical:         "BOTANICAL",
	Cultivars:         "CULTIVARS",
	PhytoSociological: "PHYTOSOCIOLOGICAL",
	Virus:             "VIRUS",
	Zoological:        "ZOOLOGICAL",
}

Functions

This section is empty.

Types

type Code

type Code int

Code provides types of nomenclatural Codes.

const (
	Unknown           Code = iota
	Bacterial              // Bacteriological Code
	Botanical              // Botanical Code
	Cultivars              // Cultivated Plant Code
	PhytoSociological      // Phytosociological Code
	Virus                  // Virus Code
	Zoological             // Zoological Code
)

Constants for different nomenclatural codes.

func New

func New(s string) Code

NewCode converts a string (number or word) to Code.

func (Code) Abbr

func (nc Code) Abbr() string

Abbr returns common abbreviation of the code that is most popular in databases and literature.

func (Code) ID

func (nc Code) ID() string

ID returns capitalized name of the code. It corresponds to ID in SFGA schema.

func (Code) String

func (nc Code) String() string

String converts code ID to lower case.

Jump to

Keyboard shortcuts

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