From d89b67f5c55c088ac8e13b6164fdd15672611d99 Mon Sep 17 00:00:00 2001 From: Hannes Hayashi Date: Sun, 20 Dec 2020 07:58:23 +0100 Subject: [PATCH] if no lines are specified, show whole log --- gsmlog/general.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsmlog/general.go b/gsmlog/general.go index 8b6aa535..cbcb4482 100644 --- a/gsmlog/general.go +++ b/gsmlog/general.go @@ -33,7 +33,7 @@ func PrintLastLines(path string, n int) error { s := string(b) lines := strings.Split(s, "\n") max := len(lines) - 1 - if n > max { + if n > max || n == 0 { n = max } for _, l := range lines[max-n : max] {