Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for LogIf (0.12 sec)

  1. internal/logger/reqinfo.go

    	for _, t := range r.tags {
    		tagsMap[t.Key] = t.Val
    	}
    	return
    }
    
    // SetReqInfo sets ReqInfo in the context.
    func SetReqInfo(ctx context.Context, req *ReqInfo) context.Context {
    	if ctx == nil {
    		LogIf(context.Background(), "", fmt.Errorf("context is nil"))
    		return nil
    	}
    	return context.WithValue(ctx, contextLogKey, req)
    }
    
    // GetReqInfo returns ReqInfo if set.
    func GetReqInfo(ctx context.Context) *ReqInfo {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 4.4K bytes
    - Viewed (0)
Back to top