cli

package
v0.0.0-...-83d7f29 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBox

func BuildBox(opts *BoxOpts) (*starbox.Starbox, error)

BuildBox creates a new Starbox with the given options.

func Process

func Process(args *Args) int

Process processes the command line arguments and executes desired actions, it returns the exit code.

func SetLog

func SetLog(l *zap.SugaredLogger)

SetLog sets the logger from outside the package.

Types

type Args

type Args struct {
	AllowRecursion      bool
	AllowGlobalReassign bool
	ModulesToLoad       []string
	IncludePath         string
	FileName            string
	CodeContent         string
	WebPort             uint16
	NumberOfArgs        int
	Arguments           []string
	LogLevel            string
	ShowVersion         bool
	InteractiveMode     bool
	OutputPrinter       string
	ConfigFile          string
}

Args is the command line arguments for starcli.

func ParseArgs

func ParseArgs() *Args

ParseArgs parses command line arguments and returns the Args object.

func (*Args) BasicBoxOpts

func (a *Args) BasicBoxOpts() *BoxOpts

BasicBoxOpts returns the basic BoxOpts object based on the command line arguments.

type BoxOpts

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

BoxOpts defines the options for creating a new Starbox instance.

Jump to

Keyboard shortcuts

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