修改core仓库名称

This commit is contained in:
linwenxiang
2020-08-29 15:15:03 +08:00
parent 33b462217c
commit 8817f02038
15 changed files with 571 additions and 11 deletions
+14
View File
@@ -0,0 +1,14 @@
package logger
import "context"
type loggerKey struct{}
func FromContext(ctx context.Context) (Logger, bool) {
l, ok := ctx.Value(loggerKey{}).(Logger)
return l, ok
}
func NewContext(ctx context.Context, l Logger) context.Context {
return context.WithValue(ctx, loggerKey{}, l)
}