scope

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exported

func Exported(name string) string

func Unexported

func Unexported(name string) string

Types

type OptFunc

type OptFunc func(*Scope)

func WithSafeNameFunc

func WithSafeNameFunc(f SafeNameFunc) OptFunc

func WithSuggestVarNameFunc

func WithSuggestVarNameFunc(f SuggestVarNameFunc) OptFunc

func WithUniqueNameFunc

func WithUniqueNameFunc(f UniqueNameFunc) OptFunc

type SafeNameFunc

type SafeNameFunc func(name string) string

type Scope

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

func New

func New(opts ...OptFunc) (ret *Scope)

func (*Scope) Claim

func (s *Scope) Claim(name string) string

func (*Scope) ClaimGlobal

func (s *Scope) ClaimGlobal(name string) string

func (*Scope) New

func (s *Scope) New(opts ...OptFunc) (ret *Scope)

New returns a new Scope with s set as the parent of ret

func (*Scope) Suggest

func (s *Scope) Suggest(input string) string

type SuggestVarNameFunc

type SuggestVarNameFunc func(input string) string

type UniqueNameFunc

type UniqueNameFunc func(s *Scope, name string, recursive bool) string

Jump to

Keyboard shortcuts

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