Files
platiparser/cmd/cli/main.go
dilap54 9d998fa4b3
All checks were successful
Build and push image / deploy (push) Successful in 1m45s
add pprof
2023-12-28 19:19:00 +03:00

38 lines
505 B
Go

package main
import (
"log"
"os"
"net/http"
_ "net/http/pprof"
"github.com/joho/godotenv"
"github.com/urfave/cli/v2"
)
func init() {
godotenv.Load(".env")
}
var commands = make([]*cli.Command, 0)
func main() {
go func() {
log.Println(http.ListenAndServe(":60089", nil))
}()
s := &cli.App{
Name: "platiparser",
Commands: commands,
Before: func(c *cli.Context) error {
godotenv.Load(".env")
return nil
},
}
err := s.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}