add comments

This commit is contained in:
MaysWind
2020-12-24 09:00:39 +08:00
parent 543ed4c850
commit 14b8474192
10 changed files with 68 additions and 0 deletions
+4
View File
@@ -5,16 +5,20 @@ import (
"github.com/mayswind/lab/pkg/errs"
)
// DefaultApi represents default api
type DefaultApi struct{}
// Initialize a default api singleton instance
var (
Default = &DefaultApi{}
)
// ApiNotFound returns api not found error
func (a *DefaultApi) ApiNotFound(c *core.Context) (interface{}, *errs.Error) {
return nil, errs.ErrApiNotFound
}
// MethodNotAllowed returns method not allowed error
func (a *DefaultApi) MethodNotAllowed(c *core.Context) (interface{}, *errs.Error) {
return nil, errs.ErrMethodNotAllowed
}