MCPcopy
hub / github.com/six2dez/OneListForAll / runUpdate

Function runUpdate

cmd/olfa/main.go:98–112  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

96}
97
98func runUpdate(args []string) {
99 fs := flag.NewFlagSet("update", flag.ExitOnError)
100 configPath := fs.String("config", "configs/pipeline.yml", "config file path")
101 source := fs.String("source", "", "source name")
102 dryRun := fs.Bool("dry-run", false, "show what would run")
103 _ = fs.Parse(args)
104
105 res, err := update.Run(update.Options{ConfigPath: *configPath, SourceName: *source, DryRun: *dryRun})
106 if err != nil {
107 die(err)
108 }
109 for _, r := range res {
110 fmt.Printf("source=%s commit=%s txt_files=%d\n", r.Name, r.Commit, r.DownloadedFiles)
111 }
112}
113
114func runClassify(args []string) {
115 fs := flag.NewFlagSet("classify", flag.ExitOnError)

Callers 1

mainFunction · 0.85

Calls 2

RunFunction · 0.92
dieFunction · 0.85

Tested by

no test coverage detected