From 8193834f0f63c088f0d00a4d8f4c4538a3627ad9 Mon Sep 17 00:00:00 2001 From: Kent Gruber Date: Tue, 1 May 2018 23:05:26 -0400 Subject: [PATCH] if block ends with a return statement drop this else and outdent its block --- core/core.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/core.go b/core/core.go index dd7ee469..d013d270 100644 --- a/core/core.go +++ b/core/core.go @@ -92,10 +92,9 @@ func ExpandPath(path string) (string, error) { if strings.HasPrefix(path, "~") { if usr, err := user.Current(); err != nil { return "", err - } else { - // Replace only the first occurrence of ~ - path = strings.Replace(path, "~", usr.HomeDir, 1) } + // Replace only the first occurrence of ~ + path = strings.Replace(path, "~", usr.HomeDir, 1) } return filepath.Abs(path) }