mirror of
https://gitee.com/johng/gf
synced 2026-07-03 03:39:35 +08:00
15 lines
236 B
Go
15 lines
236 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"github.com/gogf/gf/frame/g"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.WithValue(context.Background(), "Trace-Id", "123456789")
|
|
_, err := g.DB().Model("user").Ctx(ctx).All()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|