diff --git a/cmd/ek/main.go b/cmd/ek/main.go index b0d1bac..e84f31f 100644 --- a/cmd/ek/main.go +++ b/cmd/ek/main.go @@ -7,9 +7,9 @@ import ( "net/url" "os" - "github.com/pstuifzand/ekster/microsub" "github.com/pstuifzand/ekster/pkg/client" "github.com/pstuifzand/ekster/pkg/indieauth" + "github.com/pstuifzand/ekster/pkg/microsub" ) func init() { diff --git a/cmd/eksterd/fetch.go b/cmd/eksterd/fetch.go index 9d74d9f..bd84174 100644 --- a/cmd/eksterd/fetch.go +++ b/cmd/eksterd/fetch.go @@ -34,7 +34,7 @@ import ( "time" "github.com/garyburd/redigo/redis" - "github.com/pstuifzand/ekster/microsub" + "github.com/pstuifzand/ekster/pkg/microsub" "willnorris.com/go/microformats" ) diff --git a/cmd/eksterd/main.go b/cmd/eksterd/main.go index b8eb745..912cac5 100644 --- a/cmd/eksterd/main.go +++ b/cmd/eksterd/main.go @@ -28,7 +28,7 @@ import ( "time" "github.com/garyburd/redigo/redis" - "github.com/pstuifzand/ekster/microsub" + "github.com/pstuifzand/ekster/pkg/microsub" "github.com/pstuifzand/ekster/pkg/util" "github.com/pstuifzand/ekster/pkg/websub" ) diff --git a/cmd/eksterd/memory.go b/cmd/eksterd/memory.go index bea4776..8716dd7 100644 --- a/cmd/eksterd/memory.go +++ b/cmd/eksterd/memory.go @@ -29,8 +29,8 @@ import ( "time" "github.com/garyburd/redigo/redis" - "github.com/pstuifzand/ekster/microsub" "github.com/pstuifzand/ekster/pkg/feedbin" + "github.com/pstuifzand/ekster/pkg/microsub" "willnorris.com/go/microformats" ) diff --git a/cmd/eksterd/micropub.go b/cmd/eksterd/micropub.go index f1df5c4..9f95d43 100644 --- a/cmd/eksterd/micropub.go +++ b/cmd/eksterd/micropub.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/garyburd/redigo/redis" - "github.com/pstuifzand/ekster/microsub" + "github.com/pstuifzand/ekster/pkg/microsub" "willnorris.com/go/microformats" ) diff --git a/cmd/eksterd/microsub.go b/cmd/eksterd/microsub.go index ce910f5..2bec02b 100644 --- a/cmd/eksterd/microsub.go +++ b/cmd/eksterd/microsub.go @@ -8,7 +8,7 @@ import ( "os" "github.com/garyburd/redigo/redis" - "github.com/pstuifzand/ekster/microsub" + "github.com/pstuifzand/ekster/pkg/microsub" ) type microsubHandler struct { diff --git a/cmd/eksterd/null.go b/cmd/eksterd/null.go index 62ddbf6..c380182 100644 --- a/cmd/eksterd/null.go +++ b/cmd/eksterd/null.go @@ -18,7 +18,7 @@ package main import ( - "github.com/pstuifzand/ekster/microsub" + "github.com/pstuifzand/ekster/pkg/microsub" ) // NullBackend is the simplest possible backend diff --git a/pkg/client/requests.go b/pkg/client/requests.go index 5a7398a..4fd821e 100644 --- a/pkg/client/requests.go +++ b/pkg/client/requests.go @@ -8,7 +8,7 @@ import ( "net/url" "strings" - "github.com/pstuifzand/ekster/microsub" + "github.com/pstuifzand/ekster/pkg/microsub" ) type Client struct { diff --git a/microsub/protocol.go b/pkg/microsub/protocol.go similarity index 100% rename from microsub/protocol.go rename to pkg/microsub/protocol.go diff --git a/pkg/microsub/protocol_test.go b/pkg/microsub/protocol_test.go new file mode 100644 index 0000000..138e43b --- /dev/null +++ b/pkg/microsub/protocol_test.go @@ -0,0 +1,15 @@ +package microsub + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/pstuifzand/ekster/microsub" +) + +func TestJson(t *testing.T) { + item := microsub.Item{Type: "entry"} + result, err := json.Marshal(item) + fmt.Println(string(result), err) +}