chore: rename new service function

This commit is contained in:
Roland Bewick 2024-01-18 21:13:41 +07:00
parent 8c46ba1df4
commit c1687baece
3 changed files with 3 additions and 3 deletions

View file

@ -28,7 +28,7 @@ import (
)
// TODO: move to service.go
func CreateService(wg *sync.WaitGroup) *Service {
func NewService(wg *sync.WaitGroup) *Service {
// Load config from environment variables / .env file
godotenv.Load(".env")
cfg := &Config{}

View file

@ -24,7 +24,7 @@ func main() {
var wg sync.WaitGroup
wg.Add(1)
svc := CreateService(&wg)
svc := NewService(&wg)
if svc.cfg.CookieSecret == "" {
svc.Logger.Fatalf("required key COOKIE_SECRET missing value")

View file

@ -16,7 +16,7 @@ func main() {
var wg sync.WaitGroup
wg.Add(1)
svc := CreateService(&wg)
svc := NewService(&wg)
go func() {
app := NewApp(svc)