MCPcopy
hub / github.com/kopia/kopia / NewApp

Function NewApp

cli/app.go:326–344  ·  view source on GitHub ↗

NewApp creates a new instance of App.

()

Source from the content-addressed store, hash-verified

324
325// NewApp creates a new instance of App.
326func NewApp() *App {
327 return &App{
328 progress: &cliProgress{},
329 cliStorageProviders: getRegisteredStorageProviders(),
330
331 // testability hooks
332 exitWithError: func(err error) {
333 if err != nil {
334 os.Exit(1)
335 }
336
337 os.Exit(0)
338 },
339 stdoutWriter: colorable.NewColorableStdout(),
340 stderrWriter: colorable.NewColorableStderr(),
341 stdinReader: os.Stdin,
342 rootctx: context.Background(),
343 }
344}
345
346// SetEnvNamePrefixForTesting sets the name prefix to be used for all environment variable names for testing.
347func (c *App) SetEnvNamePrefixForTesting(prefix string) {

Callers 3

mainFunction · 0.92
mainFunction · 0.92
StartMethod · 0.92

Calls 1

Tested by

no test coverage detected