go fmt changes

This commit is contained in:
Marius Orcsik 2020-04-13 12:02:50 +02:00
parent 1ccf106616
commit 0a1567cdd4
No known key found for this signature in database
GPG key ID: 77618B618F79EB72

View file

@ -77,6 +77,7 @@ var onActor = CollectionTypes{
Following,
Followers,
}
func (t CollectionTypes) Contains(typ CollectionType) bool {
for _, tt := range t {
if strings.ToLower(string(typ)) == string(tt) {
@ -127,13 +128,13 @@ func (t CollectionType) IRI(i pub.Item) pub.IRI {
})
}
}
if len(iri) == 0 {
iri = pub.IRI(fmt.Sprintf("%s/%s", i.GetLink(), t))
}
return iri
}
func getValidActivityCollection(typ string) CollectionType {
t := CollectionType(typ)
if validActivityCollection.Contains(t) {