mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00:00 
			
		
		
		
	Add material icons for file list (#33837)
This commit is contained in:
		@@ -94,6 +94,9 @@ type RequestContext interface {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func FromContext(ctx context.Context) RequestContext {
 | 
			
		||||
	if rc, ok := ctx.(RequestContext); ok {
 | 
			
		||||
		return rc
 | 
			
		||||
	}
 | 
			
		||||
	// here we must use the current ctx and the underlying store
 | 
			
		||||
	// the current ctx guarantees that the ctx deadline/cancellation/values are respected
 | 
			
		||||
	// the underlying store guarantees that the request-specific data is available
 | 
			
		||||
@@ -134,6 +137,6 @@ func NewRequestContext(parentCtx context.Context, profDesc string) (_ context.Co
 | 
			
		||||
 | 
			
		||||
// NewRequestContextForTest creates a new RequestContext for testing purposes
 | 
			
		||||
// It doesn't add the context to the process manager, nor do cleanup
 | 
			
		||||
func NewRequestContextForTest(parentCtx context.Context) context.Context {
 | 
			
		||||
func NewRequestContextForTest(parentCtx context.Context) RequestContext {
 | 
			
		||||
	return &requestContext{Context: parentCtx, RequestDataStore: &requestDataStore{values: make(map[any]any)}}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user