restructure
This commit is contained in:
parent
d5a2e1b096
commit
22b8b18c4c
@ -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"
|
@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gospt/ctx"
|
||||
"gospt/internal/ctx"
|
||||
|
||||
"github.com/zmb3/spotify/v2"
|
||||
)
|
@ -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"
|
||||
)
|
@ -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
19
main.go
@ -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())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user