tests run (but not pass) and fine-tuning (specially tag filters) on filter_easyjson.go

This commit is contained in:
fiatjaf
2023-04-16 16:12:42 -03:00
parent 0a3e898c2f
commit c42059f4b4
12 changed files with 116 additions and 129 deletions

13
timestamp.go Normal file
View File

@@ -0,0 +1,13 @@
package nostr
import "time"
type Timestamp int64
func Now() Timestamp {
return Timestamp(time.Now().Unix())
}
func (t Timestamp) Time() time.Time {
return time.Unix(int64(t), 0)
}