Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fullpipe/gotgbot-template


https://github.com/fullpipe/gotgbot-template

Last synced: about 4 hours ago
JSON representation

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