From 0cb298ebdf4dbc94a13e8093e1d0ab2e07f5faa5 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Mon, 19 Aug 2019 13:00:10 +0900 Subject: [PATCH] Separate error handlings for readability --- internal/status/checksum.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/status/checksum.go b/internal/status/checksum.go index 6c08c58d..8ffdc466 100644 --- a/internal/status/checksum.go +++ b/internal/status/checksum.go @@ -34,7 +34,10 @@ func (c *Checksum) IsUpToDate() (bool, error) { } generates, err := glob(c.Dir, c.Generates) - if err != nil || len(generates) == 0 { + if err != nil { + return false, err + } + if len(generates) == 0 { return false, err } for _, generate := range generates {