toybox

package module
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 3

README

toybox

a scaffolding project

示例

example


go get -u github.com/inoth/toybox@latest
go install github.com/inoth/toybox/cmd/toybox@latest
toybox new helloworld

cd helloworld

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotConfig = errors.New("unable to load configuration")
	ErrRestart   = errors.New("restart")
)

Functions

This section is empty.

Types

type Option

type Option func(opt *option)

func WithConfig added in v1.5.0

func WithConfig(cfg config.ConfigMate) Option

func WithContext added in v1.5.0

func WithContext(ctx context.Context) Option

func WithName added in v1.5.0

func WithName(name string) Option

func WithServer added in v1.5.0

func WithServer(svcs ...transport.Transport) Option

func WithVersion added in v1.5.0

func WithVersion(version string) Option

func WithWatch added in v1.5.5

func WithWatch() Option

type ToyBox

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

func New

func New(opts ...Option) *ToyBox

func (*ToyBox) ID

func (tb *ToyBox) ID() string

func (*ToyBox) Name added in v1.5.0

func (tb *ToyBox) Name() string

func (*ToyBox) Run

func (tb *ToyBox) Run() (err error)

func (*ToyBox) Stop added in v1.5.0

func (tb *ToyBox) Stop() error

func (*ToyBox) Version added in v1.5.0

func (tb *ToyBox) Version() string

Jump to

Keyboard shortcuts

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