bootstrap

package
v0.0.0-...-89e6bca Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(name, version string) (*cobra.Command, func())

Bootstrap connects the the dependency graph of the project, and returns the root command and its closer for execution.

func NewRootCmd

func NewRootCmd(name, version string) *cobra.Command

NewRootCmd returns the root command.

Types

type Core

type Core interface {
	Provide(deps di.Deps)
	AddModule(module interface{})
	AddModuleFunc(constructor interface{})
}

Core the application core interface

type Option

type Option func(c Core)

Option Global register option

func Constructors

func Constructors(constructors ...interface{}) Option

Constructors register module constructors

func Dependencies

func Dependencies(providers ...di.Deps) Option

Dependencies register global dependencies

func Modules

func Modules(modules ...interface{}) Option

Modules register modules

func Register

func Register() []Option

Register the global options includes modules, module constructors and global dependencies

Jump to

Keyboard shortcuts

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