namer

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namer

type Namer struct {
	First string
	// contains filtered or unexported fields
}

Namer keeps track of used variable names.

func New

func New() *Namer

New returns a new namer.

func (*Namer) Index

func (m *Namer) Index() string

Index returns an usused index variable name.

func (*Namer) Map

func (m *Namer) Map() (string, string)

Map returns an usused key and value variable name.

func (*Namer) Name

func (m *Namer) Name(name string) string

Name returns an unused variable name that contains the passed name.

func (*Namer) Register

func (m *Namer) Register(name string) bool

Register registers a variable as used.

Jump to

Keyboard shortcuts

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