Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.
Click to show internal directories.
Click to hide internal directories.