Skip to content

Commit

Permalink
Merge pull request #300 from kolyshkin/nits
Browse files Browse the repository at this point in the history
fileExists: simplify
  • Loading branch information
guelfey committed Feb 1, 2022
2 parents 6b744b9 + c0b82c5 commit 8a38062
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions conn_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 8a38062

Please sign in to comment.