aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/template
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/feed/template/template.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/feed/template/template.go b/internal/feed/template/template.go
index 4c7b636..5a30c56 100644
--- a/internal/feed/template/template.go
+++ b/internal/feed/template/template.go
@@ -33,9 +33,12 @@ func lastUrlPart(url string) string {
}
func byteCount(str string) string {
- b, err := strconv.ParseUint(str, 10, 64)
- if err != nil {
- log.Printf("Cannot convert '%s' to byte count: %s", str, err)
+ var b uint64
+ if str != "" {
+ var err error
+ if b, err = strconv.ParseUint(str, 10, 64); err != nil {
+ log.Printf("Cannot convert '%s' to byte count: %s", str, err)
+ }
}
const unit = 1024
1-10 14:12:35 +0100Necoro1-3/+3 2008-01-10 r595@Devoty: necoro | 2008-01-10 04:04:15 +0100Necoro1-52/+3 2008-01-09 r586@Devoty: necoro | 2008-01-09 14:54:18 +0100Necoro1-1/+1 2007-12-06 r577@Devoty: necoro | 2007-12-06 20:37:36 +0100Necoro1-1/+1 2007-12-06 r572@Devoty: necoro | 2007-11-28 08:48:15 +0100Necoro1-0/+1 2007-11-27 r570@Devoty: necoro | 2007-11-27 02:08:21 +0100Necoro3-84/+108