···11+# Created by https://www.toptal.com/developers/gitignore/api/go
22+# Edit at https://www.toptal.com/developers/gitignore?templates=go
33+44+### Go ###
55+# If you prefer the allow list template instead of the deny list, see community template:
66+# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
77+#
88+# Binaries for programs and plugins
99+*.exe
1010+*.exe~
1111+*.dll
1212+*.so
1313+*.dylib
1414+bin/
1515+1616+# Test binary, built with `go test -c`
1717+*.test
1818+1919+# Output of the go coverage tool, specifically when used with LiteIDE
2020+*.out
2121+2222+# Dependency directories (remove the comment below to include it)
2323+# vendor/
2424+2525+# Go workspace file
2626+go.work
2727+2828+# End of https://www.toptal.com/developers/gitignore/api/go
2929+3030+*.hurl
+27
cmd/app/main.go
···11+package main
22+33+import (
44+ "log"
55+ "os"
66+77+ "github.com/Tulkdan/payment-gateway/internal/service"
88+ "github.com/Tulkdan/payment-gateway/internal/web"
99+)
1010+1111+func getEnv(key, defaultValue string) string {
1212+ if value := os.Getenv(key); value != "" {
1313+ return value
1414+ }
1515+ return defaultValue
1616+}
1717+1818+func main() {
1919+ paymentsService := service.NewPaymentService()
2020+2121+ server := web.NewServer(paymentsService, "8000")
2222+ server.ConfigureRouter()
2323+2424+ if err := server.Start(); err != nil {
2525+ log.Fatal("Error starting server: ", err)
2626+ }
2727+}