Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fullpipe/gotgbot-template
https://github.com/fullpipe/gotgbot-template
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/fullpipe/gotgbot-template
- Owner: fullpipe
- License: mit
- Created: 2024-11-11T18:43:27.000Z (8 days ago)
- Default Branch: main
- Last Pushed: 2024-11-12T00:09:39.000Z (8 days ago)
- Last Synced: 2024-11-12T01:18:30.693Z (8 days ago)
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gotgbot-template
## start
```sh
docker-compose up -d
go run . migrate
go run . bot# or
gowatch -args bot
```## Dependency Injection
For DI we use [fx](https://github.com/uber-go/fx).
So to register new repository add `fx.Provide(repository.NewUserRepo)`
and to register new controller```go
fx.Provide(di.AsController(controller.NewStartController)),
```where `NewStartController` function to initialize controller