Skip to content

Commit

Permalink
refactor: hide utils to settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Oct 29, 2023
1 parent 3e343db commit acbb761
Show file tree
Hide file tree
Showing 47 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion api/web/not_found.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package web

import (
"darkbot/utils"
"darkbot/settings/utils"
_ "embed"
"net/http"
"text/template"
Expand Down
2 changes: 1 addition & 1 deletion configurator/alerts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package configurator

import (
"darkbot/dtypes"
"darkbot/utils"
"darkbot/settings/utils"
"fmt"
"testing"

Expand Down
4 changes: 2 additions & 2 deletions configurator/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package configurator

import (
"darkbot/configurator/models"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
)

type ConfiguratorChannel struct {
Expand Down
2 changes: 1 addition & 1 deletion configurator/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"darkbot/configurator/models"
"darkbot/dtypes"
"darkbot/settings"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"

"gorm.io/driver/sqlite"
"gorm.io/gorm"
Expand Down
2 changes: 1 addition & 1 deletion configurator/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package configurator
import (
"darkbot/dtypes"
"darkbot/settings"
"darkbot/utils"
"darkbot/settings/utils"
"fmt"
"os"
)
Expand Down
4 changes: 2 additions & 2 deletions configurator/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package configurator

import (
"darkbot/configurator/models"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"fmt"
)

Expand Down
2 changes: 1 addition & 1 deletion discorder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package discorder

import (
"darkbot/settings"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"time"

"github.com/bwmarrin/discordgo"
Expand Down
4 changes: 2 additions & 2 deletions listener/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"darkbot/consoler"
"darkbot/consoler/helper"
"darkbot/settings"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"fmt"
"strings"

Expand Down
4 changes: 2 additions & 2 deletions management/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"darkbot/scrappy/base"
"darkbot/scrappy/player"
"darkbot/settings"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"darkbot/viewer"
"runtime"
"time"
Expand Down
2 changes: 1 addition & 1 deletion scrappy/base/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package base
import (
"darkbot/scrappy/shared/api"
"darkbot/scrappy/tests"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"io/ioutil"
"path"
)
Expand Down
4 changes: 2 additions & 2 deletions scrappy/base/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package base

import (
"darkbot/scrappy/tests"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"io/ioutil"
"os"
"path"
Expand Down
2 changes: 1 addition & 1 deletion scrappy/base/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package base

import (
"darkbot/scrappy/shared/records"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"encoding/json"
)

Expand Down
2 changes: 1 addition & 1 deletion scrappy/base/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"darkbot/scrappy/shared/parser"
"darkbot/scrappy/shared/records"

"darkbot/utils/logger"
"darkbot/settings/utils/logger"
)

type Base struct {
Expand Down
2 changes: 1 addition & 1 deletion scrappy/base/storage_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package base

import (
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"fmt"
"testing"

Expand Down
2 changes: 1 addition & 1 deletion scrappy/baseattack/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package baseattack
import (
"darkbot/scrappy/shared/api"
"darkbot/settings"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
)

type basesattackAPI struct {
Expand Down
2 changes: 1 addition & 1 deletion scrappy/baseattack/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package baseattack
import (
"darkbot/scrappy/shared/api"
"darkbot/scrappy/tests"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"io/ioutil"
"path"
)
Expand Down
4 changes: 2 additions & 2 deletions scrappy/baseattack/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package baseattack

import (
"darkbot/scrappy/tests"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"io/ioutil"
"os"
"path"
Expand Down
2 changes: 1 addition & 1 deletion scrappy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"darkbot/scrappy/baseattack"
"darkbot/scrappy/player"
"darkbot/settings"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"time"
)

Expand Down
4 changes: 2 additions & 2 deletions scrappy/player/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package player
import (
"darkbot/scrappy/shared/api"
"darkbot/scrappy/tests"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"io/ioutil"
"os"
"path"
Expand Down
2 changes: 1 addition & 1 deletion scrappy/player/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package player

import (
"darkbot/scrappy/shared/records"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"encoding/json"
)

Expand Down
2 changes: 1 addition & 1 deletion scrappy/player/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"darkbot/scrappy/shared/api"
"darkbot/scrappy/shared/parser"
"darkbot/scrappy/shared/records"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
)

type Player struct {
Expand Down
2 changes: 1 addition & 1 deletion scrappy/player/storage_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package player

import (
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"fmt"
"testing"

Expand Down
2 changes: 1 addition & 1 deletion scrappy/shared/api/request.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"io/ioutil"
"net/http"
)
Expand Down
4 changes: 2 additions & 2 deletions scrappy/shared/records/generic_records.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package records

import (
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"sync"
)

Expand Down
4 changes: 2 additions & 2 deletions settings/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package settings

import (
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"path/filepath"
"strconv"

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion utils/file.go → settings/utils/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package utils

import (
"bufio"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"fmt"
"os"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion utils/regex.go → settings/utils/regex.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package utils

import (
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"fmt"
"regexp"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion utils/shell.go → settings/utils/shell.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package utils

import (
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"fmt"
"os"
"os/exec"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion utils/template.go → settings/utils/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package utils

import (
"bytes"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"strings"
"text/template"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion viewer/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package viewer
import (
"darkbot/discorder"
"darkbot/dtypes"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"darkbot/viewer/apis"
"darkbot/viewer/templ"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion viewer/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package viewer

import (
"darkbot/settings"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
)

func Run() {
Expand Down
4 changes: 2 additions & 2 deletions viewer/templ/alert.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package templ

import (
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"darkbot/viewer/apis"
_ "embed"
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion viewer/templ/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package templ
import (
"darkbot/dtypes"
"darkbot/scrappy/base"
"darkbot/utils"
"darkbot/settings/utils"
"darkbot/viewer/apis"
_ "embed"
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion viewer/templ/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"darkbot/scrappy/baseattack"
"darkbot/scrappy/player"
"darkbot/scrappy/shared/records"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"darkbot/viewer/apis"
"fmt"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion viewer/templ/derivatives.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package templ
import (
"darkbot/scrappy/base"
"darkbot/scrappy/shared/records"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"darkbot/viewer/apis"
"math"
)
Expand Down
4 changes: 2 additions & 2 deletions viewer/templ/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package templ
import (
"darkbot/dtypes"
"darkbot/scrappy/player"
"darkbot/utils"
"darkbot/utils/logger"
"darkbot/settings/utils"
"darkbot/settings/utils/logger"
"darkbot/viewer/apis"
_ "embed"
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion viewer/templ/shared.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package templ

import (
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"darkbot/viewer/apis"
"fmt"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion viewer/viewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"darkbot/configurator"
"darkbot/dtypes"
"darkbot/settings"
"darkbot/utils/logger"
"darkbot/settings/utils/logger"
"fmt"
"time"
)
Expand Down

0 comments on commit acbb761

Please sign in to comment.