diff --git a/.gitignore b/.gitignore index e7e12b7..d87f22c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ test.db* +plannersync diff --git a/cal/main.go b/cal/main.go index 8b59277..5f8ebdd 100644 --- a/cal/main.go +++ b/cal/main.go @@ -5,8 +5,8 @@ import ( "os" "time" + "go-mod.ewintr.nl/planner/item" "go-mod.ewintr.nl/planner/sync/client" - "go-mod.ewintr.nl/planner/sync/item" ) func main() { diff --git a/sync/item/item.go b/item/item.go similarity index 100% rename from sync/item/item.go rename to item/item.go diff --git a/sync/client/client.go b/sync/client/client.go index b060fdc..9b3a4bc 100644 --- a/sync/client/client.go +++ b/sync/client/client.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "go-mod.ewintr.nl/planner/sync/item" + "go-mod.ewintr.nl/planner/item" ) type Client struct { diff --git a/sync/service/handler.go b/sync/service/handler.go index f06ca88..e5872dc 100644 --- a/sync/service/handler.go +++ b/sync/service/handler.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "go-mod.ewintr.nl/planner/sync/item" + "go-mod.ewintr.nl/planner/item" ) type Server struct { diff --git a/sync/service/handler_test.go b/sync/service/handler_test.go index c64bac8..63c6427 100644 --- a/sync/service/handler_test.go +++ b/sync/service/handler_test.go @@ -15,7 +15,7 @@ import ( "testing" "time" - "go-mod.ewintr.nl/planner/sync/item" + "go-mod.ewintr.nl/planner/item" ) func TestServerServeHTTP(t *testing.T) { diff --git a/sync/service/memory.go b/sync/service/memory.go index 743b20b..c421ee5 100644 --- a/sync/service/memory.go +++ b/sync/service/memory.go @@ -4,7 +4,7 @@ import ( "slices" "time" - "go-mod.ewintr.nl/planner/sync/item" + "go-mod.ewintr.nl/planner/item" ) type Memory struct { diff --git a/sync/service/memory_test.go b/sync/service/memory_test.go index db2496a..d2f38d3 100644 --- a/sync/service/memory_test.go +++ b/sync/service/memory_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "go-mod.ewintr.nl/planner/sync/item" + "go-mod.ewintr.nl/planner/item" ) func TestMemoryItem(t *testing.T) { @@ -87,14 +87,14 @@ func TestMemoryItem(t *testing.T) { }) expItems := []item.Item{t1, t2} sort.Slice(expItems, func(i, j int) bool { - return expItems[i].ID < actItems[j].ID + return expItems[i].ID < expItems[j].ID }) - if actItems[0].ID != t1.ID { - t.Errorf("exp %v, got %v", actItems[0].ID, t1.ID) + if actItems[0].ID != expItems[0].ID { + t.Errorf("exp %v, got %v", actItems[0].ID, expItems[0].ID) } - if actItems[1].ID != t2.ID { - t.Errorf("exp %v, got %v", actItems[1].ID, t2.ID) + if actItems[1].ID != expItems[1].ID { + t.Errorf("exp %v, got %v", actItems[1].ID, expItems[1].ID) } t.Log("select kind") diff --git a/sync/service/postgres.go b/sync/service/postgres.go index 6c27df7..e3196ef 100644 --- a/sync/service/postgres.go +++ b/sync/service/postgres.go @@ -8,7 +8,7 @@ import ( "time" _ "github.com/lib/pq" - "go-mod.ewintr.nl/planner/sync/item" + "go-mod.ewintr.nl/planner/item" ) const ( diff --git a/sync/service/storage.go b/sync/service/storage.go index 5672052..ba14634 100644 --- a/sync/service/storage.go +++ b/sync/service/storage.go @@ -4,7 +4,7 @@ import ( "errors" "time" - "go-mod.ewintr.nl/planner/sync/item" + "go-mod.ewintr.nl/planner/item" ) var (