cleanup
comment out unused getter until we have testing for it.
This commit is contained in:
@@ -43,13 +43,13 @@ type BaseConfig struct {
|
||||
// experimental since it is not used yet and may pose cylical dependency issues
|
||||
// in handlers that are called by the generated
|
||||
// swagger code. This needs to be verified.
|
||||
func GetConfigFromContext(ctx echo.Context) (Config, error) {
|
||||
cfg, ok := ctx.Get(configContextKey).(Config)
|
||||
if !ok {
|
||||
return nil, errors.New("config not found in context")
|
||||
}
|
||||
return cfg, nil
|
||||
}
|
||||
//func GetConfigFromContext(ctx echo.Context) (Config, error) {
|
||||
// cfg, ok := ctx.Get(configContextKey).(Config)
|
||||
// if !ok {
|
||||
// return nil, errors.New("config not found in context")
|
||||
// }
|
||||
// return cfg, nil
|
||||
//}
|
||||
|
||||
func (c *BaseConfig) SetRouter(e *echo.Echo) {
|
||||
c.Router = e
|
||||
|
||||
Reference in New Issue
Block a user