Fix rate limits, show the limit and not the value of the pointer...

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
Djordje Lukic 2020-11-20 15:48:40 +01:00
Родитель d7485c3fa9
Коммит d8f7315fe6
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -87,8 +87,8 @@ func printRateLimit(rl *hub.RateLimits) func(io.Writer, interface{}) error {
if *rl.Remaining <= 10 {
color = ansi.Error
}
fmt.Fprintf(out, color("Limit: %d, %s window\n"), rl.Limit, units.HumanDuration(time.Duration(*rl.LimitWindow)*time.Second))
fmt.Fprintf(out, color("Remaining: %d, %s window\n"), rl.Remaining, units.HumanDuration(time.Duration(*rl.RemainingWindow)*time.Second))
fmt.Fprintf(out, color("Limit: %d, %s window\n"), *rl.Limit, units.HumanDuration(time.Duration(*rl.LimitWindow)*time.Second))
fmt.Fprintf(out, color("Remaining: %d, %s window\n"), *rl.Remaining, units.HumanDuration(time.Duration(*rl.RemainingWindow)*time.Second))
return nil
}
}