aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/template/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed/template/template.go')
-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
enfeld2-0/+31 2016-12-20Add extensionsJason A. Donenfeld2-3/+27 2016-12-20generate: use /dev/urandom directlyJason A. Donenfeld4-14/+28 2016-02-07dmenu: read likes -rJason A. Donenfeld1-1/+1 2016-02-06zsh-completion: add prefix zstyleBenjamin Richter1-1/+11 2016-02-06Make gpg errors fatalJason A. Donenfeld1-5/+5 2016-02-06Moved to webpageJason A. Donenfeld1-7/+0