export

package module
v0.0.0-...-e696df3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 5 Imported by: 0

README

export

A lite package for export variable.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGetOnly = errors.New("get only")
)

Functions

func AllVars

func AllVars() []string

func Bool

func Bool(name string, v *bool)

func Byte

func Byte(name string, v *byte)

func Bytes

func Bytes(name string, v *[]byte)

func Int

func Int(name string, v *int)

func Int32

func Int32(name string, v *int32)

func Int64

func Int64(name string, v *int64)

func ReadOnly

func ReadOnly(name string, v []byte)

func Register

func Register(name string, v Var)

func String

func String(name string, v *string)

func Uint64

func Uint64(name string, v *uint64)

Types

type GetOnly

type GetOnly func() []byte

func (GetOnly) Get

func (fn GetOnly) Get() []byte

func (GetOnly) Set

func (fn GetOnly) Set(string) error

type SetOnly

type SetOnly func(v string) error

func (SetOnly) Get

func (fn SetOnly) Get() []byte

func (SetOnly) Set

func (fn SetOnly) Set(v string) error

type Var

type Var interface {
	Get() []byte
	Set(x string) error
}

func Lookup

func Lookup(name string) Var

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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