rss and rss item and encode

Former-commit-id: 333b5635cc0eb22964403cc78f660e02a830f077
This commit is contained in:
bel
2019-06-22 10:07:52 -06:00
parent be065c5dcb
commit fc94f94bd2
10 changed files with 353 additions and 52 deletions

24
config/encode_test.go Normal file
View File

@@ -0,0 +1,24 @@
package config
import (
"testing"
"time"
)
func TestEncodeDecode(t *testing.T) {
c := time.Now()
d := c.Add(0)
b, err := Encode(c)
if err != nil {
t.Fatal(err)
}
if err := Decode(b, &c); err != nil {
t.Fatal(err)
}
if c.Sub(d) > time.Millisecond*5 {
t.Fatalf("%v => %v", d, c)
}
}