MCPcopy
hub / github.com/perkeep/perkeep / AddFlags

Function AddFlags

pkg/client/config.go:52–59  ·  view source on GitHub ↗

AddFlags registers the "server" and "secret-keyring" string flags.

()

Source from the content-addressed store, hash-verified

50
51// AddFlags registers the "server" and "secret-keyring" string flags.
52func AddFlags() {
53 defaultPath := "/x/y/z/we're/in-a-test"
54 if !buildinfo.TestingLinked() {
55 defaultPath = osutil.UserClientConfigPath()
56 }
57 flag.StringVar(&flagServer, "server", "", "Perkeep server prefix. If blank, the default from the \"server\" field of "+defaultPath+" is used. Acceptable forms: https://you.example.com, example.com:1345 (https assumed), or http://you.example.com/alt-root")
58 osutil.AddSecretRingFlag()
59}
60
61// ExplicitServer returns the Perkeep server given in the "server"
62// flag, if any.

Callers 2

mainFunction · 0.92
mainFunction · 0.92

Calls 3

TestingLinkedFunction · 0.92
UserClientConfigPathFunction · 0.92
AddSecretRingFlagFunction · 0.92

Tested by

no test coverage detected