Fix problem, unable to attach context information
@@ -79,16 +79,12 @@ func WithFlags(database Database, flags Flags) Context {
if database == nil {
return nil
}
- if ctx, ok := database.(Context); ok {
- return ctx
- } else {
if cb, ok := database.(ContextBuilder); ok {
return cb.WithFlags(flags)
} else {
return &databaseContext{database, flags}
}
}
-}
func GetFlag(database Database, name string) interface{} {
if ctx, ok := database.(Context); ok {
