gospt/internal/gctx/context.go

25 lines
304 B
Go
Raw Permalink Normal View History

2023-01-08 05:26:06 +00:00
package gctx
2023-01-08 00:03:43 +00:00
import (
"context"
"log"
"os"
)
type Context struct {
context.Context
*log.Logger
2023-01-08 07:57:33 +00:00
Debug *log.Logger
UserId string
2023-01-08 00:03:43 +00:00
}
func NewContext(ctx context.Context) *Context {
out := &Context{
ctx,
log.New(os.Stdout, "LOG:", 0),
log.New(os.Stdout, "DEBUG:", 1),
2023-01-08 07:57:33 +00:00
"",
2023-01-08 00:03:43 +00:00
}
return out
}