mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 03:12:25 -05:00 
			
		
		
		
	[chore] update bun + extras v1.1.16 -> v1.1.17 (#2534)
This commit is contained in:
		
					parent
					
						
							
								a43ce99da9
							
						
					
				
			
			
				commit
				
					
						6433a50582
					
				
			
		
					 53 changed files with 1426 additions and 294 deletions
				
			
		
							
								
								
									
										43
									
								
								vendor/github.com/go-logr/logr/logr.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										43
									
								
								vendor/github.com/go-logr/logr/logr.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -207,10 +207,6 @@ limitations under the License. | |||
| // those. | ||||
| package logr | ||||
| 
 | ||||
| import ( | ||||
| 	"context" | ||||
| ) | ||||
| 
 | ||||
| // New returns a new Logger instance.  This is primarily used by libraries | ||||
| // implementing LogSink, rather than end users.  Passing a nil sink will create | ||||
| // a Logger which discards all log lines. | ||||
|  | @ -410,45 +406,6 @@ func (l Logger) IsZero() bool { | |||
| 	return l.sink == nil | ||||
| } | ||||
| 
 | ||||
| // contextKey is how we find Loggers in a context.Context. | ||||
| type contextKey struct{} | ||||
| 
 | ||||
| // FromContext returns a Logger from ctx or an error if no Logger is found. | ||||
| func FromContext(ctx context.Context) (Logger, error) { | ||||
| 	if v, ok := ctx.Value(contextKey{}).(Logger); ok { | ||||
| 		return v, nil | ||||
| 	} | ||||
| 
 | ||||
| 	return Logger{}, notFoundError{} | ||||
| } | ||||
| 
 | ||||
| // notFoundError exists to carry an IsNotFound method. | ||||
| type notFoundError struct{} | ||||
| 
 | ||||
| func (notFoundError) Error() string { | ||||
| 	return "no logr.Logger was present" | ||||
| } | ||||
| 
 | ||||
| func (notFoundError) IsNotFound() bool { | ||||
| 	return true | ||||
| } | ||||
| 
 | ||||
| // FromContextOrDiscard returns a Logger from ctx.  If no Logger is found, this | ||||
| // returns a Logger that discards all log messages. | ||||
| func FromContextOrDiscard(ctx context.Context) Logger { | ||||
| 	if v, ok := ctx.Value(contextKey{}).(Logger); ok { | ||||
| 		return v | ||||
| 	} | ||||
| 
 | ||||
| 	return Discard() | ||||
| } | ||||
| 
 | ||||
| // NewContext returns a new Context, derived from ctx, which carries the | ||||
| // provided Logger. | ||||
| func NewContext(ctx context.Context, logger Logger) context.Context { | ||||
| 	return context.WithValue(ctx, contextKey{}, logger) | ||||
| } | ||||
| 
 | ||||
| // RuntimeInfo holds information that the logr "core" library knows which | ||||
| // LogSinks might want to know. | ||||
| type RuntimeInfo struct { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue