1
0
mirror of https://github.com/coalaura/up.git synced 2025-07-18 21:53:23 +00:00

validate ip

This commit is contained in:
Laura
2025-06-20 21:24:16 +02:00
parent d976005959
commit 8ec9a287ae
3 changed files with 62 additions and 10 deletions

View File

@ -25,7 +25,7 @@ func (pr *ProgressReader) Read(p []byte) (int, error) {
pr.read += int64(n)
percentage := float64(pr.read) / float64(pr.total) * 100
log.Printf("\r%s: %.1f%% ", pr.label, percentage)
log.Printf("\r%s: %.1f%% ", pr.label, min(100, percentage))
return n, err
}