MCPcopy Index your code
hub / github.com/dnote/dnote / initFiles

Function initFiles

pkg/cli/infra/init.go:362–371  ·  view source on GitHub ↗

initFiles creates, if necessary, the dnote directory and files inside

(ctx context.DnoteCtx, apiEndpoint string)

Source from the content-addressed store, hash-verified

360
361// initFiles creates, if necessary, the dnote directory and files inside
362func initFiles(ctx context.DnoteCtx, apiEndpoint string) error {
363 if err := context.InitDnoteDirs(ctx.Paths); err != nil {
364 return errors.Wrap(err, "creating the dnote dir")
365 }
366 if err := initConfigFile(ctx, apiEndpoint); err != nil {
367 return errors.Wrap(err, "generating the config file")
368 }
369
370 return nil
371}

Callers 1

InitFunction · 0.85

Calls 2

InitDnoteDirsFunction · 0.92
initConfigFileFunction · 0.85

Tested by

no test coverage detected