From 86a41b843fba304ba603883451cf6b50852378a7 Mon Sep 17 00:00:00 2001 From: dd84ai Date: Sun, 11 Feb 2024 15:58:03 +0100 Subject: [PATCH] refactor: to better package name --- OLD_CODE2/consoler/consoler.py | 2 +- app/configurator/alerts.go | 6 +++--- app/configurator/alerts_test.go | 5 +++-- app/configurator/channel.go | 6 +++--- app/configurator/channel_test.go | 5 +++-- app/configurator/configurators.go | 2 +- app/configurator/connection.go | 8 ++++---- app/configurator/fixtures.go | 7 ++++--- app/configurator/models/model_templates.go | 2 +- app/configurator/models/models.go | 2 +- app/configurator/ping.go | 7 ++++--- app/configurator/tags.go | 6 +++--- app/configurator/tags_test.go | 5 +++-- app/consoler/commands/alerts.go | 11 ++++++----- app/consoler/commands/cmdgroup/main.go | 4 ++-- app/consoler/commands/root.go | 17 +++++++++-------- app/consoler/commands/shared.go | 11 ++++++----- app/consoler/commands/tags.go | 11 ++++++----- app/consoler/consoler.go | 11 ++++++----- app/consoler/consoler_test.go | 7 ++++--- app/consoler/consoler_types/types.go | 2 +- app/consoler/printer/printer.go | 3 ++- app/discorder/main.go | 7 ++++--- app/exposer/exposer.go | 3 ++- app/exposer/exposer_test.go | 3 ++- app/exposer/management/devrun.go | 3 ++- app/exposer/routes/home.go | 3 ++- app/exposer/routes/main.go | 3 ++- app/exposer/web/server.go | 3 ++- app/forumer/forum_post.go | 5 +++-- app/forumer/forum_post_test.go | 5 +++-- app/forumer/forum_threads.go | 5 +++-- app/forumer/forum_threads_test.go | 5 +++-- app/forumer/query.go | 5 +++-- app/forumer/run.go | 11 ++++++----- app/forumer/run_test.go | 9 +++++---- app/listener/main.go | 9 +++++---- app/management/anounce.go | 11 ++++++----- app/management/channels.go | 11 ++++++----- app/management/check.go | 4 ++-- app/management/migrate.go | 6 +++--- app/management/root.go | 2 +- app/management/run.go | 15 ++++++++------- app/scrappy/base/api.go | 6 +++--- app/scrappy/base/mock.go | 5 +++-- app/scrappy/base/mock_test.go | 5 +++-- app/scrappy/base/parser.go | 5 +++-- app/scrappy/base/storage.go | 6 +++--- app/scrappy/base/storage_test.go | 3 ++- app/scrappy/baseattack/api.go | 8 ++++---- app/scrappy/baseattack/api_test.go | 3 ++- app/scrappy/baseattack/mock.go | 5 +++-- app/scrappy/baseattack/mock_test.go | 5 +++-- app/scrappy/fixtures.go | 6 +++--- app/scrappy/main.go | 11 ++++++----- app/scrappy/player/api.go | 6 +++--- app/scrappy/player/mock.go | 5 +++-- app/scrappy/player/parser.go | 5 +++-- app/scrappy/player/storage.go | 6 +++--- app/scrappy/player/storage_test.go | 3 ++- app/scrappy/shared/api/request.go | 5 +++-- app/scrappy/shared/records/generic_records.go | 3 ++- app/settings/envs/envs.go | 6 +++--- app/settings/logus/logger.go | 2 +- app/settings/logus/params.go | 5 +++-- app/settings/main.go | 5 +++-- app/viewer/apis/apis.go | 8 ++++---- app/viewer/channel.go | 17 +++++++++-------- app/viewer/task.go | 7 ++++--- app/viewer/viewer.go | 11 ++++++----- app/viewer/views/alert.go | 7 ++++--- app/viewer/views/baseview/base.go | 15 ++++++++------- app/viewer/views/baseview/base_test.go | 19 ++++++++++--------- app/viewer/views/baseview/derivatives.go | 11 ++++++----- app/viewer/views/eventview/event.go | 11 ++++++----- app/viewer/views/eventview/event_test.go | 15 ++++++++------- app/viewer/views/playerview/player.go | 13 +++++++------ app/viewer/views/playerview/player_test.go | 15 ++++++++------- app/viewer/views/tags.go | 3 ++- app/viewer/views/view_table.go | 4 ++-- app/viewer/views/view_table_splitter.go | 9 +++++---- app/viewer/views/viewer_msg/view_msg.go | 7 ++++--- go.mod | 2 +- infra/tf/modules/darkbot/main.tf | 8 ++++---- infra/tf/production/backend.tf | 2 +- infra/tf/production/main.tf | 4 ++-- infra/tf/repo/backend.tf | 2 +- infra/tf/staging/backend.tf | 2 +- infra/tf/staging/main.tf | 4 ++-- main.go | 2 +- 90 files changed, 322 insertions(+), 263 deletions(-) diff --git a/OLD_CODE2/consoler/consoler.py b/OLD_CODE2/consoler/consoler.py index bad15fec..ef609744 100644 --- a/OLD_CODE2/consoler/consoler.py +++ b/OLD_CODE2/consoler/consoler.py @@ -14,7 +14,7 @@ def process_cli() -> SimpleNamespace: actions_choices = root_parser.add_subparsers( dest="command", - help="Darkbot help", + help="github.com/darklab/fl-darkbot help", required=True, ) diff --git a/app/configurator/alerts.go b/app/configurator/alerts.go index 4e771073..19fa920a 100644 --- a/app/configurator/alerts.go +++ b/app/configurator/alerts.go @@ -1,9 +1,9 @@ package configurator import ( - "darkbot/app/configurator/models" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/configurator/models" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" ) type AlertThresholdType interface { diff --git a/app/configurator/alerts_test.go b/app/configurator/alerts_test.go index 9c8121fc..d35d62a3 100644 --- a/app/configurator/alerts_test.go +++ b/app/configurator/alerts_test.go @@ -1,11 +1,12 @@ package configurator import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" "testing" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/stretchr/testify/assert" ) diff --git a/app/configurator/channel.go b/app/configurator/channel.go index 28189cf1..ff51b0c5 100644 --- a/app/configurator/channel.go +++ b/app/configurator/channel.go @@ -1,9 +1,9 @@ package configurator import ( - "darkbot/app/configurator/models" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/configurator/models" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/darklab8/darklab_goutils/goutils/utils" diff --git a/app/configurator/channel_test.go b/app/configurator/channel_test.go index bb843ef1..7e55d566 100644 --- a/app/configurator/channel_test.go +++ b/app/configurator/channel_test.go @@ -1,10 +1,11 @@ package configurator import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "testing" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/stretchr/testify/assert" ) diff --git a/app/configurator/configurators.go b/app/configurator/configurators.go index 0e99c879..4c3d5b04 100644 --- a/app/configurator/configurators.go +++ b/app/configurator/configurators.go @@ -1,6 +1,6 @@ package configurator -import "darkbot/app/settings/types" +import "github.com/darklab/fl-darkbot/app/settings/types" type Players struct { Systems ConfiguratorSystem diff --git a/app/configurator/connection.go b/app/configurator/connection.go index b8e59d9e..8aa6ae70 100644 --- a/app/configurator/connection.go +++ b/app/configurator/connection.go @@ -5,10 +5,10 @@ User settings. Probably in Sqlite3? :thinking: package configurator import ( - "darkbot/app/configurator/models" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/configurator/models" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" "github.com/darklab8/darklab_goutils/goutils/logus_core" "gorm.io/driver/sqlite" diff --git a/app/configurator/fixtures.go b/app/configurator/fixtures.go index bfabfdff..0906c3a3 100644 --- a/app/configurator/fixtures.go +++ b/app/configurator/fixtures.go @@ -1,11 +1,12 @@ package configurator import ( - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "os" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/configurator/models/model_templates.go b/app/configurator/models/model_templates.go index 66a00b91..f5ff7ab0 100644 --- a/app/configurator/models/model_templates.go +++ b/app/configurator/models/model_templates.go @@ -1,7 +1,7 @@ package models import ( - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/settings/types" "gorm.io/gorm" ) diff --git a/app/configurator/models/models.go b/app/configurator/models/models.go index f11074b7..83e24cb4 100644 --- a/app/configurator/models/models.go +++ b/app/configurator/models/models.go @@ -1,7 +1,7 @@ package models import ( - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/settings/types" "gorm.io/gorm" ) diff --git a/app/configurator/ping.go b/app/configurator/ping.go index 85c52d65..04d4743b 100644 --- a/app/configurator/ping.go +++ b/app/configurator/ping.go @@ -1,11 +1,12 @@ package configurator import ( - "darkbot/app/discorder" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" + "github.com/darklab/fl-darkbot/app/discorder" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/logus_core" ) diff --git a/app/configurator/tags.go b/app/configurator/tags.go index 6140e136..73d43e2a 100644 --- a/app/configurator/tags.go +++ b/app/configurator/tags.go @@ -1,9 +1,9 @@ package configurator import ( - "darkbot/app/configurator/models" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/configurator/models" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/configurator/tags_test.go b/app/configurator/tags_test.go index 047ee286..c7643428 100644 --- a/app/configurator/tags_test.go +++ b/app/configurator/tags_test.go @@ -1,10 +1,11 @@ package configurator import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "testing" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/stretchr/testify/assert" ) diff --git a/app/consoler/commands/alerts.go b/app/consoler/commands/alerts.go index 5b9af9fe..6703efde 100644 --- a/app/consoler/commands/alerts.go +++ b/app/consoler/commands/alerts.go @@ -1,14 +1,15 @@ package commands import ( - "darkbot/app/configurator" - "darkbot/app/consoler/commands/cmdgroup" - "darkbot/app/consoler/printer" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "strconv" "strings" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/consoler/commands/cmdgroup" + "github.com/darklab/fl-darkbot/app/consoler/printer" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/darklab8/darklab_goutils/goutils/utils" diff --git a/app/consoler/commands/cmdgroup/main.go b/app/consoler/commands/cmdgroup/main.go index a02cf774..f35693f2 100644 --- a/app/consoler/commands/cmdgroup/main.go +++ b/app/consoler/commands/cmdgroup/main.go @@ -1,8 +1,8 @@ package cmdgroup import ( - "darkbot/app/configurator" - "darkbot/app/consoler/consoler_types" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/consoler/consoler_types" "github.com/spf13/cobra" ) diff --git a/app/consoler/commands/root.go b/app/consoler/commands/root.go index 0cf071b7..89e84861 100644 --- a/app/consoler/commands/root.go +++ b/app/consoler/commands/root.go @@ -1,16 +1,17 @@ package commands import ( - "darkbot/app/configurator" - "darkbot/app/configurator/models" - "darkbot/app/consoler/commands/cmdgroup" - "darkbot/app/consoler/consoler_types" - "darkbot/app/consoler/printer" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/configurator/models" + "github.com/darklab/fl-darkbot/app/consoler/commands/cmdgroup" + "github.com/darklab/fl-darkbot/app/consoler/consoler_types" + "github.com/darklab/fl-darkbot/app/consoler/printer" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/spf13/cobra" ) diff --git a/app/consoler/commands/shared.go b/app/consoler/commands/shared.go index 65652686..8b51ffcf 100644 --- a/app/consoler/commands/shared.go +++ b/app/consoler/commands/shared.go @@ -1,12 +1,13 @@ package commands import ( - "darkbot/app/configurator" - "darkbot/app/consoler/printer" - "darkbot/app/settings" - "darkbot/app/settings/types" "fmt" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/consoler/printer" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/spf13/cobra" ) @@ -19,7 +20,7 @@ func CheckCommandAllowedToRun(cmd *cobra.Command, channels configurator.Configur } if !isChannelEnabled { - printer.Println(cmd, fmt.Sprintf("Darkbot is not connected to this channel. Run `%s connect`", settings.Config.ConsolerPrefix)) + printer.Println(cmd, fmt.Sprintf("github.com/darklab/fl-darkbot is not connected to this channel. Run `%s connect`", settings.Config.ConsolerPrefix)) return false } diff --git a/app/consoler/commands/tags.go b/app/consoler/commands/tags.go index d468185f..0ad16f5f 100644 --- a/app/consoler/commands/tags.go +++ b/app/consoler/commands/tags.go @@ -1,14 +1,15 @@ package commands import ( - "darkbot/app/configurator" - "darkbot/app/consoler/commands/cmdgroup" - "darkbot/app/consoler/printer" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" "strings" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/consoler/commands/cmdgroup" + "github.com/darklab/fl-darkbot/app/consoler/printer" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/spf13/cobra" ) diff --git a/app/consoler/consoler.go b/app/consoler/consoler.go index 24a6b734..a4984869 100644 --- a/app/consoler/consoler.go +++ b/app/consoler/consoler.go @@ -4,12 +4,13 @@ Copyright © 2022 NAME HERE package consoler import ( - "darkbot/app/configurator" - "darkbot/app/consoler/commands" - "darkbot/app/consoler/consoler_types" - "darkbot/app/settings" - "darkbot/app/settings/types" "strings" + + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/consoler/commands" + "github.com/darklab/fl-darkbot/app/consoler/consoler_types" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/types" ) type Consoler struct { diff --git a/app/consoler/consoler_test.go b/app/consoler/consoler_test.go index 962916da..cc8908b7 100644 --- a/app/consoler/consoler_test.go +++ b/app/consoler/consoler_test.go @@ -1,11 +1,12 @@ package consoler import ( - "darkbot/app/configurator" - "darkbot/app/settings" - "darkbot/app/settings/types" "testing" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/stretchr/testify/assert" ) diff --git a/app/consoler/consoler_types/types.go b/app/consoler/consoler_types/types.go index 644e70c1..48b63e1d 100644 --- a/app/consoler/consoler_types/types.go +++ b/app/consoler/consoler_types/types.go @@ -1,6 +1,6 @@ package consoler_types -import "darkbot/app/settings/types" +import "github.com/darklab/fl-darkbot/app/settings/types" type ChannelParams struct { channelID types.DiscordChannelID diff --git a/app/consoler/printer/printer.go b/app/consoler/printer/printer.go index 0d5b6537..55e9dd70 100644 --- a/app/consoler/printer/printer.go +++ b/app/consoler/printer/printer.go @@ -5,9 +5,10 @@ Those functions are capable to print back to user to Discord via Cobra */ import ( - "darkbot/app/settings/logus" "fmt" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/spf13/cobra" ) diff --git a/app/discorder/main.go b/app/discorder/main.go index d24df8cd..da0520ac 100644 --- a/app/discorder/main.go +++ b/app/discorder/main.go @@ -8,12 +8,13 @@ interface package discorder import ( - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" "time" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/bwmarrin/discordgo" diff --git a/app/exposer/exposer.go b/app/exposer/exposer.go index 0a550479..41f1de17 100644 --- a/app/exposer/exposer.go +++ b/app/exposer/exposer.go @@ -1,9 +1,10 @@ package exposer import ( - "darkbot/app/exposer/routes" _ "embed" "net/http" + + "github.com/darklab/fl-darkbot/app/exposer/routes" ) func NewExposer() { diff --git a/app/exposer/exposer_test.go b/app/exposer/exposer_test.go index 324fd6a1..16b8a396 100644 --- a/app/exposer/exposer_test.go +++ b/app/exposer/exposer_test.go @@ -1,12 +1,13 @@ package exposer import ( - "darkbot/app/settings/logus" "io" "net/http" "strings" "testing" "time" + + "github.com/darklab/fl-darkbot/app/settings/logus" ) var ( diff --git a/app/exposer/management/devrun.go b/app/exposer/management/devrun.go index 3a211ee7..33a0e636 100644 --- a/app/exposer/management/devrun.go +++ b/app/exposer/management/devrun.go @@ -1,8 +1,9 @@ package main import ( - "darkbot/app/exposer" _ "embed" + + "github.com/darklab/fl-darkbot/app/exposer" ) func main() { diff --git a/app/exposer/routes/home.go b/app/exposer/routes/home.go index 8ff18c85..7dee0a43 100644 --- a/app/exposer/routes/home.go +++ b/app/exposer/routes/home.go @@ -1,9 +1,10 @@ package routes import ( - "darkbot/app/exposer/web" _ "embed" "net/http" + + "github.com/darklab/fl-darkbot/app/exposer/web" ) //go:embed home.md diff --git a/app/exposer/routes/main.go b/app/exposer/routes/main.go index b4e00e81..0fd31fb7 100644 --- a/app/exposer/routes/main.go +++ b/app/exposer/routes/main.go @@ -1,8 +1,9 @@ package routes import ( - "darkbot/app/exposer/web" "net/http" + + "github.com/darklab/fl-darkbot/app/exposer/web" ) var Server *web.Server = web.NewServer() diff --git a/app/exposer/web/server.go b/app/exposer/web/server.go index 3b472122..eb865bfa 100644 --- a/app/exposer/web/server.go +++ b/app/exposer/web/server.go @@ -1,8 +1,9 @@ package web import ( - "darkbot/app/settings/logus" "net/http" + + "github.com/darklab/fl-darkbot/app/settings/logus" ) type Server struct { diff --git a/app/forumer/forum_post.go b/app/forumer/forum_post.go index 93d02282..3f8e37db 100644 --- a/app/forumer/forum_post.go +++ b/app/forumer/forum_post.go @@ -1,12 +1,13 @@ package forumer import ( - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/logus" "fmt" "net/url" "strings" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/anaskhan96/soup" ) diff --git a/app/forumer/forum_post_test.go b/app/forumer/forum_post_test.go index 3a28df9d..5b20f4ef 100644 --- a/app/forumer/forum_post_test.go +++ b/app/forumer/forum_post_test.go @@ -1,13 +1,14 @@ package forumer import ( - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/logus" "fmt" "os" "path/filepath" "testing" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/stretchr/testify/assert" diff --git a/app/forumer/forum_threads.go b/app/forumer/forum_threads.go index e7ef596e..345b4ea9 100644 --- a/app/forumer/forum_threads.go +++ b/app/forumer/forum_threads.go @@ -1,11 +1,12 @@ package forumer import ( - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/logus" "fmt" "net/url" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/anaskhan96/soup" ) diff --git a/app/forumer/forum_threads_test.go b/app/forumer/forum_threads_test.go index f87a3e7a..7319def3 100644 --- a/app/forumer/forum_threads_test.go +++ b/app/forumer/forum_threads_test.go @@ -1,12 +1,13 @@ package forumer import ( - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/logus" "os" "path/filepath" "testing" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/stretchr/testify/assert" diff --git a/app/forumer/query.go b/app/forumer/query.go index 6c473032..17645a78 100644 --- a/app/forumer/query.go +++ b/app/forumer/query.go @@ -1,11 +1,12 @@ package forumer import ( - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/logus" "io" "net/http" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/logus" + "golang.org/x/net/html/charset" ) diff --git a/app/forumer/run.go b/app/forumer/run.go index 60c846c3..2be31e65 100644 --- a/app/forumer/run.go +++ b/app/forumer/run.go @@ -2,16 +2,17 @@ package forumer import ( "crypto/md5" - "darkbot/app/configurator" - "darkbot/app/discorder" - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" "strings" "sync" "time" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/discorder" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/bwmarrin/discordgo" diff --git a/app/forumer/run_test.go b/app/forumer/run_test.go index 6d57b2f3..8afc62c0 100644 --- a/app/forumer/run_test.go +++ b/app/forumer/run_test.go @@ -1,12 +1,13 @@ package forumer import ( - "darkbot/app/configurator" - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "testing" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/listener/main.go b/app/listener/main.go index d70e4dea..ff3fee6b 100644 --- a/app/listener/main.go +++ b/app/listener/main.go @@ -5,13 +5,14 @@ Interacting with Discord API package listener import ( - "darkbot/app/consoler" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" "strings" + "github.com/darklab/fl-darkbot/app/consoler" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/bwmarrin/discordgo" diff --git a/app/management/anounce.go b/app/management/anounce.go index 408f04cc..8e1e36a4 100644 --- a/app/management/anounce.go +++ b/app/management/anounce.go @@ -4,13 +4,14 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/app/configurator" - "darkbot/app/discorder" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/viewer/views" "strings" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/discorder" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/viewer/views" + "github.com/spf13/cobra" ) diff --git a/app/management/channels.go b/app/management/channels.go index baf4b9ef..cf0eff8c 100644 --- a/app/management/channels.go +++ b/app/management/channels.go @@ -4,13 +4,14 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/app/configurator" - "darkbot/app/discorder" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "fmt" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/discorder" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/spf13/cobra" ) diff --git a/app/management/check.go b/app/management/check.go index 549d9088..bc02f314 100644 --- a/app/management/check.go +++ b/app/management/check.go @@ -4,8 +4,8 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/app/discorder" - "darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/discorder" + "github.com/darklab/fl-darkbot/app/settings/logus" "github.com/spf13/cobra" ) diff --git a/app/management/migrate.go b/app/management/migrate.go index ea026bfb..fdca3c02 100644 --- a/app/management/migrate.go +++ b/app/management/migrate.go @@ -4,9 +4,9 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/app/configurator" - "darkbot/app/settings" - "darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" "github.com/spf13/cobra" ) diff --git a/app/management/root.go b/app/management/root.go index 633fecc3..d3abd430 100644 --- a/app/management/root.go +++ b/app/management/root.go @@ -11,7 +11,7 @@ import ( // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "darkbot", + Use: "github.com/darklab/fl-darkbot", Short: "A brief description of your application", // Uncomment the following line if your bare application // has an action associated with it: diff --git a/app/management/run.go b/app/management/run.go index 11a4e325..ff1c31a2 100644 --- a/app/management/run.go +++ b/app/management/run.go @@ -4,16 +4,17 @@ Copyright © 2023 NAME HERE package management import ( - "darkbot/app/configurator" - "darkbot/app/forumer" - "darkbot/app/listener" - "darkbot/app/scrappy" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/viewer" "runtime" "time" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/forumer" + "github.com/darklab/fl-darkbot/app/listener" + "github.com/darklab/fl-darkbot/app/scrappy" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/viewer" + "github.com/darklab8/darklab_goutils/goutils/utils" "net/http" diff --git a/app/scrappy/base/api.go b/app/scrappy/base/api.go index d40da33b..5e2b7900 100644 --- a/app/scrappy/base/api.go +++ b/app/scrappy/base/api.go @@ -1,9 +1,9 @@ package base import ( - "darkbot/app/scrappy/shared/api" - "darkbot/app/settings" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/scrappy/shared/api" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/types" ) type basesAPI struct { diff --git a/app/scrappy/base/mock.go b/app/scrappy/base/mock.go index 8177b72e..3a92893b 100644 --- a/app/scrappy/base/mock.go +++ b/app/scrappy/base/mock.go @@ -1,10 +1,11 @@ package base import ( - "darkbot/app/scrappy/tests" - "darkbot/app/settings/logus" "os" "path" + + "github.com/darklab/fl-darkbot/app/scrappy/tests" + "github.com/darklab/fl-darkbot/app/settings/logus" ) // SPY diff --git a/app/scrappy/base/mock_test.go b/app/scrappy/base/mock_test.go index 875e38a0..7b0bea0c 100644 --- a/app/scrappy/base/mock_test.go +++ b/app/scrappy/base/mock_test.go @@ -1,12 +1,13 @@ package base import ( - "darkbot/app/scrappy/tests" - "darkbot/app/settings/logus" "os" "path" "testing" + "github.com/darklab/fl-darkbot/app/scrappy/tests" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/scrappy/base/parser.go b/app/scrappy/base/parser.go index 37eb0564..6aac8add 100644 --- a/app/scrappy/base/parser.go +++ b/app/scrappy/base/parser.go @@ -1,9 +1,10 @@ package base import ( - "darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" "encoding/json" + + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/settings/logus" ) type baseSerializer struct { diff --git a/app/scrappy/base/storage.go b/app/scrappy/base/storage.go index ea831400..0ea198f3 100644 --- a/app/scrappy/base/storage.go +++ b/app/scrappy/base/storage.go @@ -1,10 +1,10 @@ package base import ( - "darkbot/app/scrappy/shared/parser" - "darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/scrappy/shared/parser" + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/logus" ) type Base struct { diff --git a/app/scrappy/base/storage_test.go b/app/scrappy/base/storage_test.go index a022697c..c35f7be3 100644 --- a/app/scrappy/base/storage_test.go +++ b/app/scrappy/base/storage_test.go @@ -1,9 +1,10 @@ package base import ( - "darkbot/app/settings/logus" "testing" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/stretchr/testify/assert" ) diff --git a/app/scrappy/baseattack/api.go b/app/scrappy/baseattack/api.go index 0087aab9..f22dd7a9 100644 --- a/app/scrappy/baseattack/api.go +++ b/app/scrappy/baseattack/api.go @@ -1,10 +1,10 @@ package baseattack import ( - "darkbot/app/scrappy/shared/api" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/scrappy/shared/api" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" ) type basesattackAPI struct { diff --git a/app/scrappy/baseattack/api_test.go b/app/scrappy/baseattack/api_test.go index c49acd85..f02c7f97 100644 --- a/app/scrappy/baseattack/api_test.go +++ b/app/scrappy/baseattack/api_test.go @@ -1,10 +1,11 @@ package baseattack import ( - "darkbot/app/settings/logus" "strings" "testing" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/stretchr/testify/assert" ) diff --git a/app/scrappy/baseattack/mock.go b/app/scrappy/baseattack/mock.go index a5208f18..dee9a313 100644 --- a/app/scrappy/baseattack/mock.go +++ b/app/scrappy/baseattack/mock.go @@ -1,10 +1,11 @@ package baseattack import ( - "darkbot/app/scrappy/tests" - "darkbot/app/settings/logus" "os" "path" + + "github.com/darklab/fl-darkbot/app/scrappy/tests" + "github.com/darklab/fl-darkbot/app/settings/logus" ) // SPY diff --git a/app/scrappy/baseattack/mock_test.go b/app/scrappy/baseattack/mock_test.go index f270ee38..099c1613 100644 --- a/app/scrappy/baseattack/mock_test.go +++ b/app/scrappy/baseattack/mock_test.go @@ -1,12 +1,13 @@ package baseattack import ( - "darkbot/app/scrappy/tests" - "darkbot/app/settings/logus" "os" "path" "testing" + "github.com/darklab/fl-darkbot/app/scrappy/tests" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/scrappy/fixtures.go b/app/scrappy/fixtures.go index 7c42de77..adeabf55 100644 --- a/app/scrappy/fixtures.go +++ b/app/scrappy/fixtures.go @@ -1,9 +1,9 @@ package scrappy import ( - "darkbot/app/scrappy/base" - "darkbot/app/scrappy/baseattack" - "darkbot/app/scrappy/player" + "github.com/darklab/fl-darkbot/app/scrappy/base" + "github.com/darklab/fl-darkbot/app/scrappy/baseattack" + "github.com/darklab/fl-darkbot/app/scrappy/player" ) func FixtureMockedStorage(opts ...storageParam) *ScrappyStorage { diff --git a/app/scrappy/main.go b/app/scrappy/main.go index 299f95ca..6648143f 100644 --- a/app/scrappy/main.go +++ b/app/scrappy/main.go @@ -1,12 +1,13 @@ package scrappy import ( - "darkbot/app/scrappy/base" - "darkbot/app/scrappy/baseattack" - "darkbot/app/scrappy/player" - "darkbot/app/settings" - "darkbot/app/settings/logus" "time" + + "github.com/darklab/fl-darkbot/app/scrappy/base" + "github.com/darklab/fl-darkbot/app/scrappy/baseattack" + "github.com/darklab/fl-darkbot/app/scrappy/player" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" ) type ScrappyStorage struct { diff --git a/app/scrappy/player/api.go b/app/scrappy/player/api.go index 1b869625..38478d22 100644 --- a/app/scrappy/player/api.go +++ b/app/scrappy/player/api.go @@ -1,9 +1,9 @@ package player import ( - "darkbot/app/scrappy/shared/api" - "darkbot/app/settings" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/scrappy/shared/api" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/types" ) type PlayerAPI struct { diff --git a/app/scrappy/player/mock.go b/app/scrappy/player/mock.go index 2b2a1dc4..cedd8088 100644 --- a/app/scrappy/player/mock.go +++ b/app/scrappy/player/mock.go @@ -1,12 +1,13 @@ package player import ( - "darkbot/app/scrappy/tests" - "darkbot/app/settings/logus" "os" "path" "testing" + "github.com/darklab/fl-darkbot/app/scrappy/tests" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/scrappy/player/parser.go b/app/scrappy/player/parser.go index 66d6b0dd..05902a74 100644 --- a/app/scrappy/player/parser.go +++ b/app/scrappy/player/parser.go @@ -1,9 +1,10 @@ package player import ( - "darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" "encoding/json" + + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/settings/logus" ) type SerializedPlayers struct { diff --git a/app/scrappy/player/storage.go b/app/scrappy/player/storage.go index 4c8673f7..f8582d6d 100644 --- a/app/scrappy/player/storage.go +++ b/app/scrappy/player/storage.go @@ -1,9 +1,9 @@ package player import ( - "darkbot/app/scrappy/shared/parser" - "darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/scrappy/shared/parser" + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/settings/logus" ) type Player struct { diff --git a/app/scrappy/player/storage_test.go b/app/scrappy/player/storage_test.go index 24cf516e..1a0e407b 100644 --- a/app/scrappy/player/storage_test.go +++ b/app/scrappy/player/storage_test.go @@ -1,9 +1,10 @@ package player import ( - "darkbot/app/settings/logus" "testing" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/stretchr/testify/assert" ) diff --git a/app/scrappy/shared/api/request.go b/app/scrappy/shared/api/request.go index 001a32b6..6587cfb2 100644 --- a/app/scrappy/shared/api/request.go +++ b/app/scrappy/shared/api/request.go @@ -1,10 +1,11 @@ package api import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "io" "net/http" + + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" ) type APIrequest struct { diff --git a/app/scrappy/shared/records/generic_records.go b/app/scrappy/shared/records/generic_records.go index 4376a175..b93fe443 100644 --- a/app/scrappy/shared/records/generic_records.go +++ b/app/scrappy/shared/records/generic_records.go @@ -1,9 +1,10 @@ package records import ( - "darkbot/app/settings/logus" "sync" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/settings/envs/envs.go b/app/settings/envs/envs.go index c8b1cd90..a3293094 100644 --- a/app/settings/envs/envs.go +++ b/app/settings/envs/envs.go @@ -16,10 +16,10 @@ const ( ) func init() { - LogTurnJSONLogging = strings.ToLower(os.Getenv("DARKBOT_LOG_JSON")) == EnvTrue - LogShowFileLocations = strings.ToLower(os.Getenv("DARKBOT_LOG_SHOW_FILE_LOCATIONS")) == EnvTrue + LogTurnJSONLogging = strings.ToLower(os.Getenv("github.com/darklab/fl-darkbot_LOG_JSON")) == EnvTrue + LogShowFileLocations = strings.ToLower(os.Getenv("github.com/darklab/fl-darkbot_LOG_SHOW_FILE_LOCATIONS")) == EnvTrue - log_level_str, is_log_level_set := os.LookupEnv("DARKBOT_LOG_LEVEL") + log_level_str, is_log_level_set := os.LookupEnv("github.com/darklab/fl-darkbot_LOG_LEVEL") if !is_log_level_set { log_level_str = "WARN" } diff --git a/app/settings/logus/logger.go b/app/settings/logus/logger.go index 87db70d1..24b975d7 100644 --- a/app/settings/logus/logger.go +++ b/app/settings/logus/logger.go @@ -1,7 +1,7 @@ package logus import ( - "darkbot/app/settings/envs" + "github.com/darklab/fl-darkbot/app/settings/envs" "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/darklab8/darklab_goutils/goutils/logus_core/logus_types" diff --git a/app/settings/logus/params.go b/app/settings/logus/params.go index c1b361c1..93758fea 100644 --- a/app/settings/logus/params.go +++ b/app/settings/logus/params.go @@ -1,10 +1,11 @@ package logus import ( - "darkbot/app/forumer/forum_types" - "darkbot/app/settings/types" "fmt" + "github.com/darklab/fl-darkbot/app/forumer/forum_types" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/logus_core" "gorm.io/gorm" ) diff --git a/app/settings/main.go b/app/settings/main.go index dbc76ff3..eb8e12f5 100644 --- a/app/settings/main.go +++ b/app/settings/main.go @@ -1,11 +1,12 @@ package settings import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" "path/filepath" "strconv" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/caarlos0/env/v6" diff --git a/app/viewer/apis/apis.go b/app/viewer/apis/apis.go index acb53010..4dc7bf9e 100644 --- a/app/viewer/apis/apis.go +++ b/app/viewer/apis/apis.go @@ -1,10 +1,10 @@ package apis import ( - "darkbot/app/configurator" - "darkbot/app/discorder" - "darkbot/app/scrappy" - "darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/discorder" + "github.com/darklab/fl-darkbot/app/scrappy" + "github.com/darklab/fl-darkbot/app/settings/types" ) type API struct { diff --git a/app/viewer/channel.go b/app/viewer/channel.go index 41897f61..37af7809 100644 --- a/app/viewer/channel.go +++ b/app/viewer/channel.go @@ -1,18 +1,19 @@ package viewer import ( - "darkbot/app/discorder" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" - "darkbot/app/viewer/views" - "darkbot/app/viewer/views/baseview" - "darkbot/app/viewer/views/eventview" - "darkbot/app/viewer/views/playerview" "fmt" "strings" "time" + "github.com/darklab/fl-darkbot/app/discorder" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab/fl-darkbot/app/viewer/views" + "github.com/darklab/fl-darkbot/app/viewer/views/baseview" + "github.com/darklab/fl-darkbot/app/viewer/views/eventview" + "github.com/darklab/fl-darkbot/app/viewer/views/playerview" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/viewer/task.go b/app/viewer/task.go index 97d91b23..4f6dc174 100644 --- a/app/viewer/task.go +++ b/app/viewer/task.go @@ -1,13 +1,14 @@ package viewer import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" "fmt" "sync" "time" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab8/darklab_goutils/goutils/worker" "github.com/darklab8/darklab_goutils/goutils/worker/worker_types" diff --git a/app/viewer/viewer.go b/app/viewer/viewer.go index 4126c282..79f22deb 100644 --- a/app/viewer/viewer.go +++ b/app/viewer/viewer.go @@ -1,13 +1,14 @@ package viewer import ( - "darkbot/app/scrappy" - "darkbot/app/settings" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" "time" + "github.com/darklab/fl-darkbot/app/scrappy" + "github.com/darklab/fl-darkbot/app/settings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab8/darklab_goutils/goutils/worker" "github.com/darklab8/darklab_goutils/goutils/utils" diff --git a/app/viewer/views/alert.go b/app/viewer/views/alert.go index cbe6ace1..972c7ef3 100644 --- a/app/viewer/views/alert.go +++ b/app/viewer/views/alert.go @@ -1,12 +1,13 @@ package views import ( - "darkbot/app/configurator" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" _ "embed" "text/template" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/darklab8/darklab_goutils/goutils/utils/utils_types" ) diff --git a/app/viewer/views/baseview/base.go b/app/viewer/views/baseview/base.go index c8d0a834..c25cbdd4 100644 --- a/app/viewer/views/baseview/base.go +++ b/app/viewer/views/baseview/base.go @@ -1,13 +1,6 @@ package baseview import ( - "darkbot/app/configurator/models" - "darkbot/app/scrappy/base" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" - "darkbot/app/viewer/views" - "darkbot/app/viewer/views/viewer_msg" _ "embed" "fmt" "sort" @@ -15,6 +8,14 @@ import ( "strings" "text/template" + "github.com/darklab/fl-darkbot/app/configurator/models" + "github.com/darklab/fl-darkbot/app/scrappy/base" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab/fl-darkbot/app/viewer/views" + "github.com/darklab/fl-darkbot/app/viewer/views/viewer_msg" + "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/darklab8/darklab_goutils/goutils/utils/utils_types" ) diff --git a/app/viewer/views/baseview/base_test.go b/app/viewer/views/baseview/base_test.go index 47c251bf..b056d482 100644 --- a/app/viewer/views/baseview/base_test.go +++ b/app/viewer/views/baseview/base_test.go @@ -1,20 +1,21 @@ package baseview import ( - "darkbot/app/configurator" - "darkbot/app/scrappy" - "darkbot/app/scrappy/base" - "darkbot/app/scrappy/baseattack" - "darkbot/app/scrappy/player" - "darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" "fmt" "strings" "testing" "time" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/scrappy" + "github.com/darklab/fl-darkbot/app/scrappy/base" + "github.com/darklab/fl-darkbot/app/scrappy/baseattack" + "github.com/darklab/fl-darkbot/app/scrappy/player" + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/stretchr/testify/assert" ) diff --git a/app/viewer/views/baseview/derivatives.go b/app/viewer/views/baseview/derivatives.go index 3a1d2bcf..e94e9735 100644 --- a/app/viewer/views/baseview/derivatives.go +++ b/app/viewer/views/baseview/derivatives.go @@ -1,12 +1,13 @@ package baseview import ( - "darkbot/app/scrappy/base" - "darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" "math" + + "github.com/darklab/fl-darkbot/app/scrappy/base" + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" ) type ErrorCalculatingDerivative struct { diff --git a/app/viewer/views/eventview/event.go b/app/viewer/views/eventview/event.go index a9d8d90b..b8e32f2b 100644 --- a/app/viewer/views/eventview/event.go +++ b/app/viewer/views/eventview/event.go @@ -1,15 +1,16 @@ package eventview import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" - "darkbot/app/viewer/views" - "darkbot/app/viewer/views/viewer_msg" _ "embed" "encoding/json" "fmt" "strings" + + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab/fl-darkbot/app/viewer/views" + "github.com/darklab/fl-darkbot/app/viewer/views/viewer_msg" ) type EventView struct { diff --git a/app/viewer/views/eventview/event_test.go b/app/viewer/views/eventview/event_test.go index bf386643..b207015a 100644 --- a/app/viewer/views/eventview/event_test.go +++ b/app/viewer/views/eventview/event_test.go @@ -1,15 +1,16 @@ package eventview import ( - "darkbot/app/configurator" - "darkbot/app/scrappy" - "darkbot/app/scrappy/player" - "darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" "testing" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/scrappy" + "github.com/darklab/fl-darkbot/app/scrappy/player" + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/stretchr/testify/assert" ) diff --git a/app/viewer/views/playerview/player.go b/app/viewer/views/playerview/player.go index 87467f23..04e7d816 100644 --- a/app/viewer/views/playerview/player.go +++ b/app/viewer/views/playerview/player.go @@ -1,16 +1,17 @@ package playerview import ( - "darkbot/app/scrappy/player" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" - "darkbot/app/viewer/views" - "darkbot/app/viewer/views/viewer_msg" _ "embed" "fmt" "text/template" + "github.com/darklab/fl-darkbot/app/scrappy/player" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab/fl-darkbot/app/viewer/views" + "github.com/darklab/fl-darkbot/app/viewer/views/viewer_msg" + "github.com/darklab8/darklab_goutils/goutils/logus_core" "github.com/darklab8/darklab_goutils/goutils/utils" "github.com/darklab8/darklab_goutils/goutils/utils/utils_types" diff --git a/app/viewer/views/playerview/player_test.go b/app/viewer/views/playerview/player_test.go index b213ad7c..53695a7f 100644 --- a/app/viewer/views/playerview/player_test.go +++ b/app/viewer/views/playerview/player_test.go @@ -1,16 +1,17 @@ package playerview import ( - "darkbot/app/configurator" - "darkbot/app/scrappy" - "darkbot/app/scrappy/player" - "darkbot/app/scrappy/shared/records" - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" "fmt" "testing" + "github.com/darklab/fl-darkbot/app/configurator" + "github.com/darklab/fl-darkbot/app/scrappy" + "github.com/darklab/fl-darkbot/app/scrappy/player" + "github.com/darklab/fl-darkbot/app/scrappy/shared/records" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/stretchr/testify/assert" ) diff --git a/app/viewer/views/tags.go b/app/viewer/views/tags.go index d6d20d05..7d4b54e4 100644 --- a/app/viewer/views/tags.go +++ b/app/viewer/views/tags.go @@ -1,8 +1,9 @@ package views import ( - "darkbot/app/settings/types" "strings" + + "github.com/darklab/fl-darkbot/app/settings/types" ) func TagContains(name string, tags []types.Tag) bool { diff --git a/app/viewer/views/view_table.go b/app/viewer/views/view_table.go index fdfb5f2a..483aac1b 100644 --- a/app/viewer/views/view_table.go +++ b/app/viewer/views/view_table.go @@ -1,8 +1,8 @@ package views import ( - "darkbot/app/settings/types" - "darkbot/app/viewer/views/viewer_msg" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/views/viewer_msg" ) type ViewTable struct { diff --git a/app/viewer/views/view_table_splitter.go b/app/viewer/views/view_table_splitter.go index 88458b02..251103c6 100644 --- a/app/viewer/views/view_table_splitter.go +++ b/app/viewer/views/view_table_splitter.go @@ -1,13 +1,14 @@ package views import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" - "darkbot/app/viewer/views/viewer_msg" "fmt" "strings" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab/fl-darkbot/app/viewer/views/viewer_msg" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/app/viewer/views/viewer_msg/view_msg.go b/app/viewer/views/viewer_msg/view_msg.go index f8f40b4f..f6f789d0 100644 --- a/app/viewer/views/viewer_msg/view_msg.go +++ b/app/viewer/views/viewer_msg/view_msg.go @@ -1,13 +1,14 @@ package viewer_msg import ( - "darkbot/app/settings/logus" - "darkbot/app/settings/types" - "darkbot/app/viewer/apis" "fmt" "strings" "time" + "github.com/darklab/fl-darkbot/app/settings/logus" + "github.com/darklab/fl-darkbot/app/settings/types" + "github.com/darklab/fl-darkbot/app/viewer/apis" + "github.com/darklab8/darklab_goutils/goutils/utils" ) diff --git a/go.mod b/go.mod index f3d623d7..9ca2a536 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module darkbot +module github.com/darklab/fl-darkbot go 1.21.1 diff --git a/infra/tf/modules/darkbot/main.tf b/infra/tf/modules/darkbot/main.tf index ee1036b5..4524bbd4 100644 --- a/infra/tf/modules/darkbot/main.tf +++ b/infra/tf/modules/darkbot/main.tf @@ -1,6 +1,6 @@ # Create a docker image resource # -> docker pull nginx:latest -resource "docker_image" "darkbot" { +resource "docker_image" "github.com/darklab/fl-darkbot" { name = "darkwind8/darkbot:${var.tag_version}" keep_locally = true } @@ -28,8 +28,8 @@ variable "secrets" { # # Create a docker container resource # # -> same as 'docker run --name nginx -p8080:80 -d nginx:latest' -resource "docker_container" "darkbot" { - name = "darkbot" +resource "docker_container" "github.com/darklab/fl-darkbot" { + name = "github.com/darklab/fl-darkbot" image = docker_image.darkbot.image_id env = [ @@ -41,7 +41,7 @@ resource "docker_container" "darkbot" { "SCRAPPY_LOOP_DELAY=60", "VIEWER_LOOP_DELAY=10", "DEVENV_MOCK_API=false", - "DARKBOT_LOG_LEVEL=${var.debug ? "DEBUG" : "WARN"}" + "github.com/darklab/fl-darkbot_LOG_LEVEL=${var.debug ? "DEBUG" : "WARN"}" ] restart = "always" diff --git a/infra/tf/production/backend.tf b/infra/tf/production/backend.tf index 10368219..3c4517fa 100644 --- a/infra/tf/production/backend.tf +++ b/infra/tf/production/backend.tf @@ -3,7 +3,7 @@ terraform { bucket = "darklab-eu-west-1-global-terraform-state" dynamodb_table = "darklab-eu-west-1-global-terraform-state" encrypt = true - key = "darkbot.production.tfstate" + key = "github.com/darklab/fl-darkbot.production.tfstate" region = "eu-west-1" } } diff --git a/infra/tf/production/main.tf b/infra/tf/production/main.tf index 681b8371..9aa27563 100644 --- a/infra/tf/production/main.tf +++ b/infra/tf/production/main.tf @@ -9,7 +9,7 @@ output "cluster_ip" { value = module.stack.cluster_ip } -data "aws_ssm_parameter" "darkbot" { +data "aws_ssm_parameter" "github.com/darklab/fl-darkbot" { name = "/terraform/hetzner/darkbot/production" } @@ -22,7 +22,7 @@ provider "docker" { ssh_opts = ["-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-i", "~/.ssh/id_rsa.darklab"] } -module "darkbot" { +module "github.com/darklab/fl-darkbot" { source = "../modules/darkbot" configurator_dbname = "production" consoler_prefix = "." diff --git a/infra/tf/repo/backend.tf b/infra/tf/repo/backend.tf index 41516318..b188bddc 100644 --- a/infra/tf/repo/backend.tf +++ b/infra/tf/repo/backend.tf @@ -3,7 +3,7 @@ terraform { bucket = "darklab-eu-west-1-global-terraform-state" dynamodb_table = "darklab-eu-west-1-global-terraform-state" encrypt = true - key = "darkbot.repo.tfstate" + key = "github.com/darklab/fl-darkbot.repo.tfstate" region = "eu-west-1" } } diff --git a/infra/tf/staging/backend.tf b/infra/tf/staging/backend.tf index 5afd33cc..7584901d 100644 --- a/infra/tf/staging/backend.tf +++ b/infra/tf/staging/backend.tf @@ -3,7 +3,7 @@ terraform { bucket = "darklab-eu-west-1-global-terraform-state" dynamodb_table = "darklab-eu-west-1-global-terraform-state" encrypt = true - key = "darkbot.staging.tfstate" + key = "github.com/darklab/fl-darkbot.staging.tfstate" region = "eu-west-1" } } diff --git a/infra/tf/staging/main.tf b/infra/tf/staging/main.tf index ee098c38..185444e5 100644 --- a/infra/tf/staging/main.tf +++ b/infra/tf/staging/main.tf @@ -14,7 +14,7 @@ provider "docker" { ssh_opts = ["-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=/dev/null", "-i", "~/.ssh/id_rsa.darklab"] } -data "aws_ssm_parameter" "darkbot" { +data "aws_ssm_parameter" "github.com/darklab/fl-darkbot" { name = "/terraform/hetzner/darkbot/staging" } @@ -22,7 +22,7 @@ locals { secrets = nonsensitive(jsondecode(data.aws_ssm_parameter.darkbot.value)) } -module "darkbot" { +module "github.com/darklab/fl-darkbot" { source = "../modules/darkbot" configurator_dbname = "staging" consoler_prefix = "," diff --git a/main.go b/main.go index 8cf9afaf..154156ab 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ Copyright © 2022 NAME HERE package main import ( - "darkbot/app/management" + "github.com/darklab/fl-darkbot/app/management" ) func main() {