Dont log errors on proxy leftover cleanup

This commit is contained in:
Tim Hockin
2016-02-02 15:58:06 -08:00
committed by Matt Dupre
parent 19c80e126a
commit 41ba8ced6d
4 changed files with 67 additions and 30 deletions

View File

@@ -576,3 +576,17 @@ func (runner *runner) reload() {
f()
}
}
// IsNotFoundError returns true if the error indicates "not found". It parses
// the error string looking for known values, which is imperfect but works in
// practice.
func IsNotFoundError(err error) bool {
es := err.Error()
if strings.Contains(es, "No such file or directory") {
return true
}
if strings.Contains(es, "No chain/target/match by that name") {
return true
}
return false
}