788857d2c3
remove unneeded panics improve error handling add tests fix error checking that was comparing for exact values sort imports
22 lines
566 B
Go
22 lines
566 B
Go
package cmd
|
|
|
|
const defaultMaxTries = 3
|
|
|
|
var (
|
|
stopOnError bool
|
|
maxTries int
|
|
takeOverExistingChannel bool
|
|
refill int
|
|
limit int
|
|
skipSpaceCheck bool
|
|
)
|
|
|
|
const (
|
|
StatusPending = "pending" // waiting for permission to sync
|
|
StatusQueued = "queued" // in sync queue. will be synced soon
|
|
StatusSyncing = "syncing" // syncing now
|
|
StatusSynced = "synced" // done
|
|
StatusFailed = "failed"
|
|
)
|
|
|
|
var SyncStatuses = []string{StatusPending, StatusQueued, StatusSyncing, StatusSynced, StatusFailed}
|