feat(blogo,metadata): typecast TypedMetadata on constructor to prevent unecessary wrapping
This commit is contained in:
@@ -152,6 +152,9 @@ type TypedMetadata struct {
|
||||
}
|
||||
|
||||
func NewTypedMetadata(m Metadata) *TypedMetadata {
|
||||
if tm, ok := m.(*TypedMetadata); ok {
|
||||
return tm
|
||||
}
|
||||
return &TypedMetadata{m}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user