MCPcopy Index your code
hub / github.com/kopia/kopia / validateStartEndTime

Function validateStartEndTime

cli/command_snapshot_create.go:211–227  ·  view source on GitHub ↗
(st, et string)

Source from the content-addressed store, hash-verified

209}
210
211func validateStartEndTime(st, et string) error {
212 startTime, err := parseTimestamp(st)
213 if err != nil {
214 return errors.Wrap(err, "could not parse start-time")
215 }
216
217 endTime, err := parseTimestamp(et)
218 if err != nil {
219 return errors.Wrap(err, "could not parse end-time")
220 }
221
222 if startTimeAfterEndTime(startTime, endTime) {
223 return errors.New("start time override cannot be after the end time override")
224 }
225
226 return nil
227}
228
229func (c *commandSnapshotCreate) setupUploader(rep repo.RepositoryWriter) *upload.Uploader {
230 u := upload.NewUploader(rep)

Callers 1

runMethod · 0.85

Calls 2

parseTimestampFunction · 0.85
startTimeAfterEndTimeFunction · 0.85

Tested by

no test coverage detected