gospt/main.go

33 lines
611 B
Go
Raw Normal View History

2024-02-18 06:57:47 +00:00
package main
import (
2024-02-19 06:17:28 +00:00
"gfx.cafe/util/go/fxplus"
2024-02-18 06:57:47 +00:00
"go.uber.org/fx"
2024-02-19 02:51:25 +00:00
"git.asdf.cafe/abs3nt/gspot/src/components/cache"
"git.asdf.cafe/abs3nt/gspot/src/components/cli"
"git.asdf.cafe/abs3nt/gspot/src/components/commands"
2024-02-19 06:17:28 +00:00
"git.asdf.cafe/abs3nt/gspot/src/components/logger"
"git.asdf.cafe/abs3nt/gspot/src/services"
2024-02-18 06:57:47 +00:00
)
func main() {
2024-02-18 09:30:19 +00:00
var s fx.Shutdowner
app := fx.New(
2024-02-19 06:17:28 +00:00
fxplus.WithLogger,
2024-02-18 09:30:19 +00:00
fx.Populate(&s),
2024-02-19 06:17:28 +00:00
services.Config,
2024-02-18 09:30:19 +00:00
fx.Provide(
2024-02-19 06:17:28 +00:00
fxplus.Context,
2024-02-18 19:48:33 +00:00
cache.NewCache,
2024-02-18 06:57:47 +00:00
commands.NewCommander,
2024-02-19 06:17:28 +00:00
services.NewSpotifyClient,
logger.NewLogger,
2024-02-18 06:57:47 +00:00
),
2024-02-18 09:30:19 +00:00
fx.Invoke(
cli.Run,
),
)
app.Run()
2024-02-18 06:57:47 +00:00
}