Move namespace string into const

This commit is contained in:
Matt Baer
2018-08-04 14:23:14 +02:00
parent 57919aaaec
commit 26688eb59d
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ func NewOrderedCollection(accountRoot, collType string, items int) *OrderedColle
oc := OrderedCollection{
BaseObject: BaseObject{
Context: []interface{}{
"https://www.w3.org/ns/activitystreams",
Namespace,
},
ID: accountRoot + "/" + collType,
Type: "OrderedCollection",
@@ -62,7 +62,7 @@ func NewOrderedCollectionPage(accountRoot, collType string, items, page int) *Or
ocp := OrderedCollectionPage{
BaseObject: BaseObject{
Context: []interface{}{
"https://www.w3.org/ns/activitystreams",
Namespace,
},
ID: fmt.Sprintf("%s/%s?page=%d", accountRoot, collType, page),
Type: "OrderedCollectionPage",