Add --rewind flag for cat command (#3321)

This commit is contained in:
Anis Elleuch
2020-07-28 13:19:56 -07:00
committed by GitHub
parent 90dc31f6ba
commit ec734d0f71
5 changed files with 63 additions and 26 deletions
+10 -2
View File
@@ -16,7 +16,10 @@
package cmd
import "fmt"
import (
"fmt"
"time"
)
/// Collection of standard errors
@@ -154,9 +157,14 @@ func (e EmptyPath) Error() string {
}
// ObjectMissing (EINVAL) - object key missing.
type ObjectMissing struct{}
type ObjectMissing struct {
timeRef time.Time
}
func (e ObjectMissing) Error() string {
if !e.timeRef.IsZero() {
return "Object did not exist at `" + e.timeRef.Format(time.RFC1123) + "`"
}
return "Object does not exist"
}