From c0b82c518deec875d59a5e01f4491f0ea7e9fae5 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 31 Jan 2022 20:46:24 -0800 Subject: [PATCH] fileExists: simplify Signed-off-by: Kir Kolyshkin --- conn_other.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/conn_other.go b/conn_other.go index 616dcf66..89e81c1a 100644 --- a/conn_other.go +++ b/conn_other.go @@ -85,9 +85,6 @@ func getRuntimeDirectory() (string, error) { } func fileExists(filename string) bool { - if _, err := os.Stat(filename); !os.IsNotExist(err) { - return true - } else { - return false - } + _, err := os.Stat(filename) + return !os.IsNotExist(err) }