Add 'wal' command

This commit is contained in:
Ben Johnson
2020-12-30 16:03:23 -07:00
parent 8a7d8175fc
commit 11d7d22383
6 changed files with 225 additions and 3 deletions

View File

@@ -74,13 +74,13 @@ func (c *SnapshotsCommand) Run(ctx context.Context, args []string) (err error) {
// List all snapshots.
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
fmt.Fprintln(w, "replica\tname\tgeneration\tindex\tcreated")
fmt.Fprintln(w, "replica\tgeneration\tindex\tsize\tcreated")
for _, info := range infos {
fmt.Fprintf(w, "%s\t%s\t%s\t%d\t%s\n",
fmt.Fprintf(w, "%s\t%s\t%d\t%d\t%s\n",
info.Replica,
info.Name,
info.Generation,
info.Index,
info.Size,
info.CreatedAt.Format(time.RFC3339),
)
}