mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 22:42:24 -05:00 
			
		
		
		
	[chore] bump ncruces go-sqlite3 => v0.23.0 (#3785)
* bump ncruces go-sqlite3 => v0.23.0 * whoops, add missing vendor changes...
This commit is contained in:
		
					parent
					
						
							
								fccb0bc102
							
						
					
				
			
			
				commit
				
					
						24f6760c0e
					
				
			
		
					 40 changed files with 836 additions and 833 deletions
				
			
		
							
								
								
									
										16
									
								
								vendor/github.com/ncruces/go-sqlite3/error.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/ncruces/go-sqlite3/error.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -15,7 +15,7 @@ type Error struct { | |||
| 	str  string | ||||
| 	msg  string | ||||
| 	sql  string | ||||
| 	code uint64 | ||||
| 	code res_t | ||||
| } | ||||
| 
 | ||||
| // Code returns the primary error code for this error. | ||||
|  | @ -146,27 +146,27 @@ func (e ExtendedErrorCode) Code() ErrorCode { | |||
| 	return ErrorCode(e) | ||||
| } | ||||
| 
 | ||||
| func errorCode(err error, def ErrorCode) (msg string, code uint32) { | ||||
| func errorCode(err error, def ErrorCode) (msg string, code res_t) { | ||||
| 	switch code := err.(type) { | ||||
| 	case nil: | ||||
| 		return "", _OK | ||||
| 	case ErrorCode: | ||||
| 		return "", uint32(code) | ||||
| 		return "", res_t(code) | ||||
| 	case xErrorCode: | ||||
| 		return "", uint32(code) | ||||
| 		return "", res_t(code) | ||||
| 	case *Error: | ||||
| 		return code.msg, uint32(code.code) | ||||
| 		return code.msg, res_t(code.code) | ||||
| 	} | ||||
| 
 | ||||
| 	var ecode ErrorCode | ||||
| 	var xcode xErrorCode | ||||
| 	switch { | ||||
| 	case errors.As(err, &xcode): | ||||
| 		code = uint32(xcode) | ||||
| 		code = res_t(xcode) | ||||
| 	case errors.As(err, &ecode): | ||||
| 		code = uint32(ecode) | ||||
| 		code = res_t(ecode) | ||||
| 	default: | ||||
| 		code = uint32(def) | ||||
| 		code = res_t(def) | ||||
| 	} | ||||
| 	return err.Error(), code | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue