MCPcopy Create free account
hub / github.com/git-bug/git-bug / ImmutableMetadata

Method ImmutableMetadata

entities/identity/identity.go:546–558  ·  view source on GitHub ↗

ImmutableMetadata return all metadata for this Identity, accumulated from each version. If multiple value are found, the first defined takes precedence.

()

Source from the content-addressed store, hash-verified

544// ImmutableMetadata return all metadata for this Identity, accumulated from each version.
545// If multiple value are found, the first defined takes precedence.
546func (i *Identity) ImmutableMetadata() map[string]string {
547 metadata := make(map[string]string)
548
549 for _, version := range i.versions {
550 for key, value := range version.metadata {
551 if _, has := metadata[key]; !has {
552 metadata[key] = value
553 }
554 }
555 }
556
557 return metadata
558}
559
560// MutableMetadata return all metadata for this Identity, accumulated from each version.
561// If multiple value are found, the last defined takes precedence.

Callers 4

TestMetadataFunction · 0.95
NewIdentityExcerptFunction · 0.80
runBridgeAuthAddTokenFunction · 0.80
runUserShowFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestMetadataFunction · 0.76