(svc appServices, parent commandParent)
| 27 | } |
| 28 | |
| 29 | func (c *commandSnapshotEstimate) setup(svc appServices, parent commandParent) { |
| 30 | cmd := parent.Command("estimate", "Estimate the snapshot size and upload time.") |
| 31 | cmd.Arg("source", "File or directory to analyze.").Required().ExistingFileOrDirVar(&c.snapshotEstimateSource) |
| 32 | cmd.Flag("show-files", "Show files").BoolVar(&c.snapshotEstimateShowFiles) |
| 33 | cmd.Flag("quiet", "Do not display scanning progress").Short('q').BoolVar(&c.snapshotEstimateQuiet) |
| 34 | cmd.Flag("upload-speed", "Upload speed to use for estimation").Default("10").PlaceHolder("mbit/s").Float64Var(&c.snapshotEstimateUploadSpeed) |
| 35 | cmd.Flag("max-examples-per-bucket", "Max examples per bucket").Default("10").IntVar(&c.maxExamplesPerBucket) |
| 36 | cmd.Action(svc.repositoryReaderAction(c.run)) |
| 37 | c.out.setup(svc) |
| 38 | } |
| 39 | |
| 40 | type estimateProgress struct { |
| 41 | stats snapshot.Stats |
nothing calls this directly
no test coverage detected