lnrpc: reuse common FileExists function

This commit is contained in:
Joost Jager committed 2019-02-01 09:47:31 +01:00
1 parent 70c874be88
commit 8996a1490d
3 files changed
+2 -32

No files matched your search

-10
View File
@@ -60,16 +60,6 @@ type Server struct {
// AutopilotServer gRPC service.
var _ AutopilotServer = (*Server)(nil)
// fileExists reports whether the named file or directory exists.
func fileExists(name string) bool {
if _, err := os.Stat(name); err != nil {
if os.IsNotExist(err) {
return false
}
}
return true
}
// New returns a new instance of the autopilotrpc Autopilot sub-server. We also
// return the set of permissions for the macaroons that we may create within
// this method. If the macaroons we need aren't found in the filepath, then