Files
workspace/code/allapp/allapp-go/cmd/main.go
T
2026-02-25 17:31:09 +08:00

43 lines
843 B
Go

package main
import (
"allapp/config"
"fmt"
)
func main() {
config.InitConf()
fmt.Print(config.GetConf().Server.BaseUrl)
//app := fiber.New()
//logger := middleware.NewLogger(middleware.LoggerConfig{
// ExtraKeys: []string{"request_id", "abc"},
//})
//
//log.SetLogger(logger)
//
//defer logger.Sync()
//
//app.Use(func(c fiber.Ctx) error {
// ctx := context.WithValue(c.Context(), "request_id", "123")
// ctx = context.WithValue(ctx, "user_id", "456")
// ctx = context.WithValue(ctx, "trace_id", "789")
//
// c.SetContext(ctx)
// return c.Next()
//})
//
//app.Get("/", func(c fiber.Ctx) error {
// log.WithContext(c.Context()).Infow("MSG",
// "request_id", "12345",
// "user_id", "abc123",
// "status", "pending",
// )
// return c.SendString("Hello, World!")
//})
//
//log.Fatal(app.Listen(":3000"))
}