restructure

This commit is contained in:
jjohnstondev 2023-01-07 21:22:54 -08:00
parent d5a2e1b096
commit 22b8b18c4c
7 changed files with 14 additions and 23 deletions

View File

@ -1,4 +1,4 @@
package authmanager
package auth
import (
"encoding/json"
@ -9,8 +9,8 @@ import (
"os"
"path/filepath"
"gospt/config"
"gospt/ctx"
"gospt/internal/config"
"gospt/internal/ctx"
"github.com/zmb3/spotify/v2"
spotifyauth "github.com/zmb3/spotify/v2/auth"

View File

@ -11,7 +11,7 @@ import (
"strings"
"time"
"gospt/ctx"
"gospt/internal/ctx"
"github.com/zmb3/spotify/v2"
)

View File

@ -3,9 +3,9 @@ package runner
import (
"fmt"
"gospt/commands"
"gospt/ctx"
"gospt/tui"
"gospt/internal/commands"
"gospt/internal/ctx"
"gospt/internal/tui"
"github.com/zmb3/spotify/v2"
)

View File

@ -5,8 +5,8 @@ import (
"os"
"time"
"gospt/commands"
"gospt/ctx"
"gospt/internal/commands"
"gospt/internal/ctx"
"github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea"

19
main.go
View File

@ -7,19 +7,10 @@ import (
"os"
"path/filepath"
"gospt/authmanager"
"gospt/config"
"gospt/ctx"
"gospt/runner"
"github.com/zmb3/spotify/v2"
spotifyauth "github.com/zmb3/spotify/v2/auth"
)
var (
auth *spotifyauth.Authenticator
ch = make(chan *spotify.Client)
state = "abc123"
"gospt/internal/auth"
"gospt/internal/config"
"gospt/internal/ctx"
"gospt/internal/runner"
)
func init() {
@ -32,7 +23,7 @@ func main() {
var err error
log.New(os.Stdout, "LOG:", 0)
ctx := ctx.NewContext(context.Background())
client, err := authmanager.GetClient(ctx)
client, err := auth.GetClient(ctx)
if err != nil {
panic(err.Error())
}