refactor from pkg to internal

This commit is contained in:
lyx0 2023-01-04 15:32:17 +01:00
parent ee893cbea3
commit 76c78dfbb1
36 changed files with 31 additions and 31 deletions

View file

@ -4,9 +4,9 @@ import (
"fmt" "fmt"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/internal/data" "github.com/lyx0/nourybot/internal/data"
"github.com/lyx0/nourybot/pkg/commands/decapi"
"github.com/lyx0/nourybot/pkg/common"
) )
// AddChannel takes in a channel name, then calls GetIdByLogin for the // AddChannel takes in a channel name, then calls GetIdByLogin for the

View file

@ -5,8 +5,8 @@ import (
"strconv" "strconv"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/internal/data" "github.com/lyx0/nourybot/internal/data"
"github.com/lyx0/nourybot/pkg/common"
) )
// AddCommand takes in a name parameter and a twitch.PrivateMessage. It slices the // AddCommand takes in a name parameter and a twitch.PrivateMessage. It slices the

View file

@ -4,8 +4,8 @@ import (
"strings" "strings"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/commands" "github.com/lyx0/nourybot/internal/commands"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
// handleCommand takes in a twitch.PrivateMessage and then routes the message to // handleCommand takes in a twitch.PrivateMessage and then routes the message to

View file

@ -11,8 +11,8 @@ import (
"github.com/jakecoffman/cron" "github.com/jakecoffman/cron"
"github.com/joho/godotenv" "github.com/joho/godotenv"
_ "github.com/lib/pq" _ "github.com/lib/pq"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/internal/data" "github.com/lyx0/nourybot/internal/data"
"github.com/lyx0/nourybot/pkg/common"
"github.com/nicklaw5/helix" "github.com/nicklaw5/helix"
"go.uber.org/zap" "go.uber.org/zap"
) )

View file

@ -6,8 +6,8 @@ import (
"strings" "strings"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/internal/data" "github.com/lyx0/nourybot/internal/data"
"github.com/lyx0/nourybot/pkg/common"
) )
// AddTimer slices the message into relevant parts, adding the values onto a // AddTimer slices the message into relevant parts, adding the values onto a

View file

@ -5,9 +5,9 @@ import (
"strconv" "strconv"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/internal/data" "github.com/lyx0/nourybot/internal/data"
"github.com/lyx0/nourybot/pkg/commands/decapi"
"github.com/lyx0/nourybot/pkg/common"
) )
// AddUser calls GetIdByLogin to get the twitch id of the login name and then adds // AddUser calls GetIdByLogin to get the twitch id of the login name and then adds

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
func Bttv(target, query string, tc *twitch.Client) { func Bttv(target, query string, tc *twitch.Client) {

View file

@ -2,8 +2,8 @@ package commands
import ( import (
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/commands/decapi" "github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap" "go.uber.org/zap"
) )

View file

@ -2,7 +2,7 @@ package commands
import ( import (
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
func Coinflip(target string, tc *twitch.Client) { func Coinflip(target string, tc *twitch.Client) {

View file

@ -2,8 +2,8 @@ package commands
import ( import (
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/commands/decapi" "github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap" "go.uber.org/zap"
) )

View file

@ -2,7 +2,7 @@ package commands
import ( import (
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
func Echo(target, message string, tc *twitch.Client) { func Echo(target, message string, tc *twitch.Client) {

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
func Ffz(target, query string, tc *twitch.Client) { func Ffz(target, query string, tc *twitch.Client) {

View file

@ -2,8 +2,8 @@ package commands
import ( import (
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/commands/decapi" "github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap" "go.uber.org/zap"
) )

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/commands/ivr" "github.com/lyx0/nourybot/internal/commands/ivr"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
func FirstLine(target, channel, username string, tc *twitch.Client) { func FirstLine(target, channel, username string, tc *twitch.Client) {

View file

@ -2,8 +2,8 @@ package commands
import ( import (
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/commands/decapi" "github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap" "go.uber.org/zap"
) )

View file

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"github.com/lyx0/nourybot/pkg/humanize" "github.com/lyx0/nourybot/internal/humanize"
) )
func Ping(target string, tc *twitch.Client) { func Ping(target string, tc *twitch.Client) {

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
func Preview(target, channel string, tc *twitch.Client) { func Preview(target, channel string, tc *twitch.Client) {

View file

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
) )
func Seventv(target, emote string, tc *twitch.Client) { func Seventv(target, emote string, tc *twitch.Client) {

View file

@ -2,8 +2,8 @@ package commands
import ( import (
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/commands/decapi" "github.com/lyx0/nourybot/internal/commands/decapi"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap" "go.uber.org/zap"
) )

View file

@ -7,7 +7,7 @@ import (
owm "github.com/briandowns/openweathermap" owm "github.com/briandowns/openweathermap"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/joho/godotenv" "github.com/joho/godotenv"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap" "go.uber.org/zap"
) )

View file

@ -7,7 +7,7 @@ import (
"net/http" "net/http"
"github.com/gempir/go-twitch-irc/v3" "github.com/gempir/go-twitch-irc/v3"
"github.com/lyx0/nourybot/pkg/common" "github.com/lyx0/nourybot/internal/common"
"go.uber.org/zap" "go.uber.org/zap"
) )