remove controller feature from package ghttp

This commit is contained in:
jflyfox
2021-07-30 15:15:44 +08:00
parent ef77a54c7e
commit 4267aadd78
15 changed files with 19 additions and 1117 deletions

View File

@ -8,13 +8,14 @@ package gerror
// Option is option for creating error.
type Option struct {
Error error // Wrapped error.
Stack bool // Record stack information into error.
Error error // Wrapped error if any.
Stack bool // Whether recording stack information into error.
Text string // Error text, which is created by New* functions.
Code int // Error code if necessary.
}
// NewOption creates and returns an error with Option.
// It is the senior usage for creating error, which is often used internally in framework.
func NewOption(option Option) error {
err := &Error{
error: option.Error,