Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(cfg Config) (*App, error)

func (*App) Run

func (a *App) Run(ctx context.Context, mode string) error

func (*App) SetSubArgs

func (a *App) SetSubArgs(args []string)

type Config

type Config struct {
	IndexPath    string
	LogLevel     string
	ProjectRoot  string
	NoEmbeddings bool
	IncludeTests bool
	ModelName    string
	ForceReindex bool
	// IndexPathSet records whether -index was given on the command line, so a
	// subcommand that declares its own -index can take the global one as its
	// default without overriding a default with a default.
	IndexPathSet bool
}

func ConfigFromFlags

func ConfigFromFlags() *Config

ConfigFromFlags returns a *Config so that flag.Parse() (called by the caller after this function returns) writes parsed values into the same struct the caller holds. Returning by value would give the caller a copy whose fields are never updated by flag.Parse, since flag.StringVar binds to the address of the local cfg here.

Jump to

Keyboard shortcuts

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