mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 07:12:26 -05:00 
			
		
		
		
	Upstep Go dependencies (#340)
* Upstep Go dependencies * tiny linter fix * Tidy
This commit is contained in:
		
					parent
					
						
							
								5506a5ecbe
							
						
					
				
			
			
				commit
				
					
						67ac8db190
					
				
			
		
					 160 changed files with 248601 additions and 232400 deletions
				
			
		
							
								
								
									
										15
									
								
								vendor/codeberg.org/gruf/go-logger/level.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								vendor/codeberg.org/gruf/go-logger/level.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -5,7 +5,7 @@ type LEVEL uint8 | |||
| 
 | ||||
| // Available levels of logging. | ||||
| const ( | ||||
| 	unset LEVEL = 255 | ||||
| 	unset LEVEL = ^LEVEL(0) | ||||
| 	DEBUG LEVEL = 5 | ||||
| 	INFO  LEVEL = 10 | ||||
| 	WARN  LEVEL = 15 | ||||
|  | @ -16,7 +16,7 @@ const ( | |||
| var unknownLevel = "unknown" | ||||
| 
 | ||||
| // Levels defines a mapping of log LEVELs to formatted level strings | ||||
| type Levels map[LEVEL]string | ||||
| type Levels [^LEVEL(0)]string | ||||
| 
 | ||||
| // DefaultLevels returns the default set of log levels | ||||
| func DefaultLevels() Levels { | ||||
|  | @ -29,11 +29,10 @@ func DefaultLevels() Levels { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // LevelString fetches the appropriate level string for the provided level, or "unknown" | ||||
| func (l Levels) LevelString(lvl LEVEL) string { | ||||
| 	str, ok := l[lvl] | ||||
| 	if !ok { | ||||
| 		return unknownLevel | ||||
| // Get fetches the level string for the provided value, or "unknown" | ||||
| func (l Levels) Get(lvl LEVEL) string { | ||||
| 	if str := l[int(lvl)]; str != "" { | ||||
| 		return str | ||||
| 	} | ||||
| 	return str | ||||
| 	return unknownLevel | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue