Commit 5052f3ae authored by m1093782566's avatar m1093782566

add error string reference

parent 89e70760
...@@ -329,10 +329,13 @@ func IsNotFoundError(err error) bool { ...@@ -329,10 +329,13 @@ func IsNotFoundError(err error) bool {
es := err.Error() es := err.Error()
if strings.Contains(es, "does not exist") { if strings.Contains(es, "does not exist") {
// set with the same name already exists // set with the same name already exists
// xref: https://github.com/Olipro/ipset/blob/master/lib/errcode.c#L32-L33
return true return true
} }
if strings.Contains(es, "element is missing") { if strings.Contains(es, "element is missing") {
// entry is missing from the set // entry is missing from the set
// xref: https://github.com/Olipro/ipset/blob/master/lib/parse.c#L1904
// https://github.com/Olipro/ipset/blob/master/lib/parse.c#L1925
return true return true
} }
return false return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment