nameid

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID interface {
	Name() string
	ID() string
	String() string
}

type NameID

type NameID struct {
	// contains filtered or unexported fields
}

func Guess

func Guess(s NameOrID, guessID func(string) *NameID, guessName ...func(string) *NameID) (*NameID, error)

func New

func New(s string) *NameID

func Wrap

func Wrap(name string, id string) *NameID

func (*NameID) ID

func (d *NameID) ID() string

func (*NameID) Name

func (d *NameID) Name() string

func (*NameID) ShortID

func (d *NameID) ShortID() string

func (*NameID) String

func (d *NameID) String() string

type NameOrID

type NameOrID string

func (NameOrID) String

func (n NameOrID) String() string

Jump to

Keyboard shortcuts

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