move
This commit is contained in:
parent
c26d11299a
commit
dc2c74dd4b
@ -10,7 +10,6 @@ before:
|
|||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
main: ./cmd/gspot
|
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
|
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
build:
|
build:
|
||||||
go build -ldflags="-X 'git.asdf.cafe/abs3nt/gspot/src/components/cli.Version=$(shell git show -s --date=short --pretty='format:%h (%ad)' HEAD)'" -o dist/ ./cmd/gspot
|
go build -ldflags="-X 'git.asdf.cafe/abs3nt/gspot/src/components/cli.Version=$(shell git show -s --date=short --pretty='format:%h (%ad)' HEAD)'" -o dist/ .
|
||||||
|
|
||||||
run: build
|
run: build
|
||||||
./dist/gspot
|
./dist/gspot
|
||||||
|
31
main.go
Normal file
31
main.go
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gfx.cafe/util/go/fxplus"
|
||||||
|
"go.uber.org/fx"
|
||||||
|
|
||||||
|
"git.asdf.cafe/abs3nt/gspot/src/components/cache"
|
||||||
|
"git.asdf.cafe/abs3nt/gspot/src/components/cli"
|
||||||
|
"git.asdf.cafe/abs3nt/gspot/src/components/commands"
|
||||||
|
"git.asdf.cafe/abs3nt/gspot/src/components/logger"
|
||||||
|
"git.asdf.cafe/abs3nt/gspot/src/services"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
var s fx.Shutdowner
|
||||||
|
app := fx.New(
|
||||||
|
fxplus.WithLogger,
|
||||||
|
fx.Populate(&s),
|
||||||
|
services.Config,
|
||||||
|
fx.Provide(
|
||||||
|
fxplus.Context,
|
||||||
|
cache.NewCache,
|
||||||
|
commands.NewCommander,
|
||||||
|
logger.NewLogger,
|
||||||
|
),
|
||||||
|
fx.Invoke(
|
||||||
|
cli.Run,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
app.Run()
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user