Skip to content

Commit

Permalink
refactor: to better package name
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Feb 11, 2024
1 parent c33eb85 commit 86a41b8
Show file tree
Hide file tree
Showing 90 changed files with 322 additions and 263 deletions.
2 changes: 1 addition & 1 deletion OLD_CODE2/consoler/consoler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
6 changes: 3 additions & 3 deletions app/configurator/alerts.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions app/configurator/alerts_test.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
6 changes: 3 additions & 3 deletions app/configurator/channel.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 3 additions & 2 deletions app/configurator/channel_test.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion app/configurator/configurators.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions app/configurator/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions app/configurator/fixtures.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion app/configurator/models/model_templates.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models

import (
"darkbot/app/settings/types"
"github.com/darklab/fl-darkbot/app/settings/types"

"gorm.io/gorm"
)
Expand Down
2 changes: 1 addition & 1 deletion app/configurator/models/models.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models

import (
"darkbot/app/settings/types"
"github.com/darklab/fl-darkbot/app/settings/types"

"gorm.io/gorm"
)
Expand Down
7 changes: 4 additions & 3 deletions app/configurator/ping.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
6 changes: 3 additions & 3 deletions app/configurator/tags.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
5 changes: 3 additions & 2 deletions app/configurator/tags_test.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
11 changes: 6 additions & 5 deletions app/consoler/commands/alerts.go
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
4 changes: 2 additions & 2 deletions app/consoler/commands/cmdgroup/main.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
17 changes: 9 additions & 8 deletions app/consoler/commands/root.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
11 changes: 6 additions & 5 deletions app/consoler/commands/shared.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand All @@ -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
}

Expand Down
11 changes: 6 additions & 5 deletions app/consoler/commands/tags.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
11 changes: 6 additions & 5 deletions app/consoler/consoler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ Copyright © 2022 NAME HERE <EMAIL ADDRESS>
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 {
Expand Down
7 changes: 4 additions & 3 deletions app/consoler/consoler_test.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion app/consoler/consoler_types/types.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion app/consoler/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
7 changes: 4 additions & 3 deletions app/discorder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion app/exposer/exposer.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package exposer

import (
"darkbot/app/exposer/routes"
_ "embed"
"net/http"

"github.com/darklab/fl-darkbot/app/exposer/routes"
)

func NewExposer() {
Expand Down
3 changes: 2 additions & 1 deletion app/exposer/exposer_test.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion app/exposer/management/devrun.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"darkbot/app/exposer"
_ "embed"

"github.com/darklab/fl-darkbot/app/exposer"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion app/exposer/routes/home.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit 86a41b8

Please sign in to comment.