Changes
6 changed files (+20/-1)
-
-
@@ -209,6 +209,9 @@ func (c *Collection) Append(ob Item) error {// Count returns the maximum between the length of Items in collection and its TotalItems property func (c *Collection) Count() uint { if c == nil { return 0 } if c.TotalItems > 0 { return c.TotalItems }
-
-
-
@@ -158,6 +158,9 @@ func (c CollectionPage) Collection() ItemCollection {// Count returns the maximum between the length of Items in the collection page and its TotalItems property func (c *CollectionPage) Count() uint { if c == nil { return 0 } if c.TotalItems > 0 { return c.TotalItems }
-
-
-
@@ -55,6 +55,9 @@ func (i *ItemCollection) Append(o Item) error {// Count returns the length of Items in the item collection func (i *ItemCollection) Count() uint { if i == nil { return 0 } return uint(len(*i)) }
-
-
-
@@ -3,9 +3,10 @@ package activitypubimport ( "bytes" "fmt" "github.com/buger/jsonparser" "strconv" "strings" "github.com/buger/jsonparser" ) const NilLangRef LangRef = "-"
-
@@ -147,6 +148,9 @@ func (n *NaturalLanguageValues) Append(lang LangRef, value Content) error {// Count returns the length of Items in the item collection func (n *NaturalLanguageValues) Count() uint { if n == nil { return 0 } return uint(len(*n)) }
-
-
-
@@ -212,6 +212,9 @@ func (o OrderedCollection) Contains(r Item) bool {// Count returns the maximum between the length of Items in collection and its TotalItems property func (o *OrderedCollection) Count() uint { if o == nil { return 0 } if o.TotalItems > 0 { return o.TotalItems }
-
-
-
@@ -161,6 +161,9 @@ func (o OrderedCollectionPage) Collection() ItemCollection {// Count returns the maximum between the length of Items in the collection page and its TotalItems property func (o *OrderedCollectionPage) Count() uint { if o == nil { return 0 } if o.TotalItems > 0 { return o.TotalItems }
-