mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 16:07:33 +08:00
add comments
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user