facebookarchive / rocks-strata

Other
133 stars 24 forks source link

Using hours instead of days notation #4

Closed arturogutierrez closed 8 years ago

arturogutierrez commented 8 years ago

It's a very small fix but I've been facing with this some time ago.

The thing is the example says that you should use 30d to delete backups older than 30 days but 30d notation is not supported by Go, the valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". So if you try to call strata with 30d (or something like that) you will get a beautiful exception:

2016/03/28 09:30:37 Starting strata driver
panic: time: unknown unit d in duration 30d

The PR purpose is only convert one month time to hours in order to not change the example behavior.

igorcanadi commented 8 years ago

Thanks @arturogutierrez !