v0.5: fixed nil dereference for empty autocert config, fixed and simplified 'error' module, small readme and docs update

This commit is contained in:
default
2024-08-13 04:59:34 +08:00
parent 2fc82c3790
commit 85fb637551
20 changed files with 209 additions and 235 deletions

View File

@@ -11,5 +11,5 @@ func NewPath(s string) (Path, E.NestedError) {
if s == "" || s[0] == '/' {
return Path{F.NewStringable(s)}, E.Nil()
}
return Path{}, E.Invalid("path", s).Extra("must be empty or start with '/'")
return Path{}, E.Invalid("path", s).With("must be empty or start with '/'")
}