mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-15 16:50:16 +01:00
nip34: other fields in repository announcement.
This commit is contained in:
@@ -10,12 +10,14 @@ import (
|
|||||||
type Repository struct {
|
type Repository struct {
|
||||||
nostr.Event
|
nostr.Event
|
||||||
|
|
||||||
ID string
|
ID string
|
||||||
Name string
|
Name string
|
||||||
Description string
|
Description string
|
||||||
Web []string
|
Web []string
|
||||||
Clone []string
|
Clone []string
|
||||||
Relays []string
|
Relays []string
|
||||||
|
EarliestUniqueCommitID string
|
||||||
|
Maintainers []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func ParseRepository(event nostr.Event) Repository {
|
func ParseRepository(event nostr.Event) Repository {
|
||||||
@@ -40,6 +42,10 @@ func ParseRepository(event nostr.Event) Repository {
|
|||||||
repo.Clone = append(repo.Clone, tag[1:]...)
|
repo.Clone = append(repo.Clone, tag[1:]...)
|
||||||
case "relays":
|
case "relays":
|
||||||
repo.Relays = append(repo.Relays, tag[1:]...)
|
repo.Relays = append(repo.Relays, tag[1:]...)
|
||||||
|
case "r":
|
||||||
|
repo.EarliestUniqueCommitID = tag[1]
|
||||||
|
case "maintainers":
|
||||||
|
repo.Maintainers = append(repo.Maintainers, tag[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user