diff --git a/go.mod b/go.mod index a1b4a19..0c529b4 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/ekzyis/snappy go 1.20 + +require gopkg.in/guregu/null.v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index e69de29..87d7a10 100644 --- a/go.sum +++ b/go.sum @@ -0,0 +1,2 @@ +gopkg.in/guregu/null.v4 v4.0.0 h1:1Wm3S1WEA2I26Kq+6vcW+w0gcDo44YKYD7YIEJNHDjg= +gopkg.in/guregu/null.v4 v4.0.0/go.mod h1:YoQhUrADuG3i9WqesrCmpNRwm1ypAgSHYqoOcTu/JrI= diff --git a/items.go b/items.go index 0f4dc8c..16a52c4 100644 --- a/items.go +++ b/items.go @@ -4,6 +4,8 @@ import ( "encoding/json" "fmt" "time" + + "gopkg.in/guregu/null.v4" ) type Item struct { @@ -14,6 +16,7 @@ type Item struct { Text string `json:"text"` Sats int `json:"sats"` CreatedAt time.Time `json:"createdAt"` + DeletedAt null.Time `json:"deletedAt"` Comments []Comment `json:"comments"` NComments int `json:"ncomments"` User User `json:"user"`