toybox

package module
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 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 = fmt.Errorf("unable to load configuration")
)

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 ...server.Server) Option

func WithVersion added in v1.5.0

func WithVersion(version string) 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

Directories

Path Synopsis
cmd
toybox Module
component

Jump to

Keyboard shortcuts

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