fix(blogo,metadata): return TypedMetadata directly if Metadata already implements it
This commit is contained in:
@@ -46,6 +46,9 @@ type TypedMetadata interface {
|
||||
}
|
||||
|
||||
func Typed(m Metadata) TypedMetadata {
|
||||
if m, ok := m.(TypedMetadata); ok {
|
||||
return m
|
||||
}
|
||||
return &typedMetadata{m}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user