Format inline file sizes with humanReadableSize()

This commit is contained in:
Seednode 2023-09-15 15:19:56 -05:00
parent d4cf9cfa4f
commit 7d49a86e70
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import (
) )
const ( const (
ReleaseVersion string = "0.90.0" ReleaseVersion string = "0.90.1"
) )
var ( var (

View File

@ -307,10 +307,10 @@ func serveMedia(paths []string, regexes *regexes, cache *fileCache, formats *typ
if format.Type() != "embed" { if format.Type() != "embed" {
if Verbose { if Verbose {
fmt.Printf("%s | Serve: %s (%d) to %s in %s\n", fmt.Printf("%s | Serve: %s (%s) to %s in %s\n",
startTime.Format(logDate), startTime.Format(logDate),
path, path,
len(formattedPage), humanReadableSize(len(formattedPage)),
realIP(r), realIP(r),
time.Since(startTime).Round(time.Microsecond), time.Since(startTime).Round(time.Microsecond),
) )