From b7a4b1fee8fbc571d161f802a47edf9bf67881e3 Mon Sep 17 00:00:00 2001 From: Daan Sprenkels Date: Sun, 15 Sep 2019 17:43:09 +0200 Subject: [PATCH] Move packages out of dirs Fixes #2 --- cmd/rushlink/main.go | 6 +++--- {internal/db => db}/db.go | 2 +- {pkg/gobmarsh => gobmarsh}/marshal.go | 0 {internal/handlers => handlers}/handlers.go | 6 +++--- {internal/metrics => metrics}/metrics.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename {internal/db => db}/db.go (98%) rename {pkg/gobmarsh => gobmarsh}/marshal.go (100%) rename {internal/handlers => handlers}/handlers.go (98%) rename {internal/metrics => metrics}/metrics.go (96%) diff --git a/cmd/rushlink/main.go b/cmd/rushlink/main.go index 6b3b459..e2e1fae 100644 --- a/cmd/rushlink/main.go +++ b/cmd/rushlink/main.go @@ -9,9 +9,9 @@ import ( "github.com/gorilla/mux" "github.com/pkg/errors" - "gitea.hashru.nl/dsprenkels/rushlink/internal/db" - "gitea.hashru.nl/dsprenkels/rushlink/internal/handlers" - "gitea.hashru.nl/dsprenkels/rushlink/internal/metrics" + "gitea.hashru.nl/dsprenkels/rushlink/db" + "gitea.hashru.nl/dsprenkels/rushlink/handlers" + "gitea.hashru.nl/dsprenkels/rushlink/metrics" ) type ParsedArguments struct { diff --git a/internal/db/db.go b/db/db.go similarity index 98% rename from internal/db/db.go rename to db/db.go index 2de10e1..fdc9842 100644 --- a/internal/db/db.go +++ b/db/db.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" bolt "go.etcd.io/bbolt" - "gitea.hashru.nl/dsprenkels/rushlink/pkg/gobmarsh" + "gitea.hashru.nl/dsprenkels/rushlink/gobmarsh" ) var DB *bolt.DB diff --git a/pkg/gobmarsh/marshal.go b/gobmarsh/marshal.go similarity index 100% rename from pkg/gobmarsh/marshal.go rename to gobmarsh/marshal.go diff --git a/internal/handlers/handlers.go b/handlers/handlers.go similarity index 98% rename from internal/handlers/handlers.go rename to handlers/handlers.go index a4a0a87..d8f24cd 100644 --- a/internal/handlers/handlers.go +++ b/handlers/handlers.go @@ -2,7 +2,7 @@ package handlers //go:generate go get github.com/go-bindata/go-bindata //go:generate go get -u github.com/go-bindata/go-bindata/... -//go:generate go-bindata -pkg $GOPACKAGE -prefix ../../assets ../../assets/... +//go:generate go-bindata -pkg $GOPACKAGE -prefix ../assets ../assets/... import ( "bytes" @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" bolt "go.etcd.io/bbolt" - "gitea.hashru.nl/dsprenkels/rushlink/internal/db" - "gitea.hashru.nl/dsprenkels/rushlink/pkg/gobmarsh" + "gitea.hashru.nl/dsprenkels/rushlink/db" + "gitea.hashru.nl/dsprenkels/rushlink/gobmarsh" ) type PasteType int diff --git a/internal/metrics/metrics.go b/metrics/metrics.go similarity index 96% rename from internal/metrics/metrics.go rename to metrics/metrics.go index 8ff53bb..7c5c7d9 100644 --- a/internal/metrics/metrics.go +++ b/metrics/metrics.go @@ -12,7 +12,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" bolt "go.etcd.io/bbolt" - "gitea.hashru.nl/dsprenkels/rushlink/internal/db" + "gitea.hashru.nl/dsprenkels/rushlink/db" ) const (