adjust errors and logger

This commit is contained in:
Shen Junzheng
2025-04-01 13:09:59 +08:00
parent f31953c42b
commit 67c9623cea
49 changed files with 553 additions and 981 deletions

View File

@@ -0,0 +1,11 @@
package errors
import "net/http"
func InvalidArg(arg string) error {
return Newf(nil, http.StatusBadRequest, "invalid argument: %s", arg)
}
func HTTPShutDown(cause error) error {
return Newf(cause, http.StatusInternalServerError, "http server shut down")
}