MCPcopy Create free account
hub / github.com/cogentcore/core / DefaultOptions

Function DefaultOptions

cli/options.go:59–73  ·  view source on GitHub ↗

DefaultOptions returns a new [Options] value with standard default values, based on the given app name and optional app about info.

(name string, about ...string)

Source from the content-addressed store, hash-verified

57// with standard default values, based on the given
58// app name and optional app about info.
59func DefaultOptions(name string, about ...string) *Options {
60 abt := ""
61 if len(about) > 0 {
62 abt = about[0]
63 }
64 return &Options{
65 AppName: name,
66 AppAbout: abt,
67 Fatal: true,
68 PrintSuccess: true,
69 DefaultEncoding: "toml",
70 DefaultFiles: []string{strcase.ToKebab(name) + ".toml"},
71 IncludePaths: []string{".", "configs"},
72 }
73}

Callers 14

mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
TestRunFunction · 0.85
TestConfigFuncFunction · 0.85
TestOpenFunction · 0.85
TestUsageFunction · 0.85

Calls 1

ToKebabFunction · 0.92

Tested by 6

TestRunFunction · 0.68
TestConfigFuncFunction · 0.68
TestOpenFunction · 0.68
TestUsageFunction · 0.68
TestSaveFunction · 0.68
TestConfigOpenFunction · 0.68