diff --git a/.gitignore b/.gitignore index cdee5c0c..8d5afc8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -config/config.go +src/config/config.go .vscode diff --git a/main.go b/main.go deleted file mode 100644 index 29dc0a96..00000000 --- a/main.go +++ /dev/null @@ -1,10 +0,0 @@ -package main - -import ( - _ "git.handmade.network/hmn/hmn/migration" - "git.handmade.network/hmn/hmn/website" -) - -func main() { - website.WebsiteCommand.Execute() -} diff --git a/color/color.go b/src/color/color.go similarity index 100% rename from color/color.go rename to src/color/color.go diff --git a/config/config.go.example b/src/config/config.go.example similarity index 100% rename from config/config.go.example rename to src/config/config.go.example diff --git a/config/types.go b/src/config/types.go similarity index 100% rename from config/types.go rename to src/config/types.go diff --git a/db/db.go b/src/db/db.go similarity index 88% rename from db/db.go rename to src/db/db.go index 56e12978..09d8756d 100644 --- a/db/db.go +++ b/src/db/db.go @@ -3,8 +3,8 @@ package db import ( "context" - "git.handmade.network/hmn/hmn/config" - "git.handmade.network/hmn/hmn/oops" + "git.handmade.network/hmn/hmn/src/config" + "git.handmade.network/hmn/hmn/src/oops" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" ) diff --git a/logging/logging.go b/src/logging/logging.go similarity index 97% rename from logging/logging.go rename to src/logging/logging.go index 34045e5f..2181ee2b 100644 --- a/logging/logging.go +++ b/src/logging/logging.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "git.handmade.network/hmn/hmn/color" - "git.handmade.network/hmn/hmn/oops" + "git.handmade.network/hmn/hmn/src/color" + "git.handmade.network/hmn/hmn/src/oops" "github.com/rs/zerolog" "github.com/rs/zerolog/log" ) diff --git a/src/main.go b/src/main.go new file mode 100644 index 00000000..22f756c4 --- /dev/null +++ b/src/main.go @@ -0,0 +1,10 @@ +package main + +import ( + _ "git.handmade.network/hmn/hmn/src/migration" + "git.handmade.network/hmn/hmn/src/website" +) + +func main() { + website.WebsiteCommand.Execute() +} diff --git a/migration/migration.go b/src/migration/migration.go similarity index 97% rename from migration/migration.go rename to src/migration/migration.go index d96bf101..509f30e4 100644 --- a/migration/migration.go +++ b/src/migration/migration.go @@ -10,10 +10,10 @@ import ( "strings" "time" - "git.handmade.network/hmn/hmn/db" - "git.handmade.network/hmn/hmn/migration/migrations" - "git.handmade.network/hmn/hmn/migration/types" - "git.handmade.network/hmn/hmn/website" + "git.handmade.network/hmn/hmn/src/db" + "git.handmade.network/hmn/hmn/src/migration/migrations" + "git.handmade.network/hmn/hmn/src/migration/types" + "git.handmade.network/hmn/hmn/src/website" "github.com/jackc/pgx/v4" "github.com/spf13/cobra" ) diff --git a/migration/migrationTemplate.txt b/src/migration/migrationTemplate.txt similarity index 90% rename from migration/migrationTemplate.txt rename to src/migration/migrationTemplate.txt index f9a130ba..302f35ef 100644 --- a/migration/migrationTemplate.txt +++ b/src/migration/migrationTemplate.txt @@ -3,7 +3,7 @@ package migrations import ( "time" - "git.handmade.network/hmn/hmn/migration/types" + "git.handmade.network/hmn/hmn/src/migration/types" "github.com/jackc/pgx/v4" ) diff --git a/migration/migrations/2021-03-10T051621Z_Initial.go b/src/migration/migrations/2021-03-10T051621Z_Initial.go similarity index 99% rename from migration/migrations/2021-03-10T051621Z_Initial.go rename to src/migration/migrations/2021-03-10T051621Z_Initial.go index 09d55bc8..203a95ec 100644 --- a/migration/migrations/2021-03-10T051621Z_Initial.go +++ b/src/migration/migrations/2021-03-10T051621Z_Initial.go @@ -4,7 +4,7 @@ import ( "context" "time" - "git.handmade.network/hmn/hmn/migration/types" + "git.handmade.network/hmn/hmn/src/migration/types" "github.com/jackc/pgx/v4" ) diff --git a/migration/migrations/migrations.go b/src/migration/migrations/migrations.go similarity index 76% rename from migration/migrations/migrations.go rename to src/migration/migrations/migrations.go index bce2533f..c11c9e7b 100644 --- a/migration/migrations/migrations.go +++ b/src/migration/migrations/migrations.go @@ -1,6 +1,6 @@ package migrations -import "git.handmade.network/hmn/hmn/migration/types" +import "git.handmade.network/hmn/hmn/src/migration/types" var All map[types.MigrationVersion]types.Migration = make(map[types.MigrationVersion]types.Migration) diff --git a/migration/types/types.go b/src/migration/types/types.go similarity index 100% rename from migration/types/types.go rename to src/migration/types/types.go diff --git a/oops/oops.go b/src/oops/oops.go similarity index 100% rename from oops/oops.go rename to src/oops/oops.go diff --git a/oops/oops_test.go b/src/oops/oops_test.go similarity index 100% rename from oops/oops_test.go rename to src/oops/oops_test.go diff --git a/website/website.go b/src/website/website.go similarity index 93% rename from website/website.go rename to src/website/website.go index 1a218274..ee73a529 100644 --- a/website/website.go +++ b/src/website/website.go @@ -9,9 +9,9 @@ import ( "os/signal" "time" - "git.handmade.network/hmn/hmn/config" - "git.handmade.network/hmn/hmn/db" - "git.handmade.network/hmn/hmn/logging" + "git.handmade.network/hmn/hmn/src/config" + "git.handmade.network/hmn/hmn/src/db" + "git.handmade.network/hmn/hmn/src/logging" "github.com/julienschmidt/httprouter" "github.com/spf13/cobra" )