mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-18 23:33:51 +01:00
v0.5.0-rc4: fixing autocert issue, cache ACME registration, added ls-config option
This commit is contained in:
@@ -118,11 +118,11 @@ func (ne NestedError) Subjectf(format string, args ...any) NestedError {
|
||||
return ne
|
||||
}
|
||||
|
||||
func (ne NestedError) IsNil() bool {
|
||||
func (ne NestedError) NoError() bool {
|
||||
return ne.err == nil
|
||||
}
|
||||
|
||||
func (ne NestedError) IsNotNil() bool {
|
||||
func (ne NestedError) HasError() bool {
|
||||
return ne.err != nil
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ func (ne *NestedError) writeToSB(sb *strings.Builder, level int, prefix string)
|
||||
ne.writeIndents(sb, level)
|
||||
sb.WriteString(prefix)
|
||||
|
||||
if ne.IsNil() {
|
||||
if ne.NoError() {
|
||||
sb.WriteString("nil")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ func TestErrorIs(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNil(t *testing.T) {
|
||||
ExpectTrue(t, Nil().IsNil())
|
||||
ExpectFalse(t, Nil().IsNotNil())
|
||||
ExpectTrue(t, Nil().NoError())
|
||||
ExpectFalse(t, Nil().HasError())
|
||||
ExpectEqual(t, Nil().Error(), "nil")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user