mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 13:22:25 -05:00 
			
		
		
		
	migrate go version to 1.17 (#203)
* migrate go version to 1.17 * update contributing
This commit is contained in:
		
					parent
					
						
							
								e681aac589
							
						
					
				
			
			
				commit
				
					
						f2e5bedea6
					
				
			
		
					 282 changed files with 11863 additions and 12600 deletions
				
			
		
							
								
								
									
										17
									
								
								vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								vendor/github.com/uptrace/bun/dialect/sqlitedialect/scan.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -1,28 +1,11 @@ | |||
| package sqlitedialect | ||||
| 
 | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"reflect" | ||||
| 
 | ||||
| 	"github.com/uptrace/bun/schema" | ||||
| ) | ||||
| 
 | ||||
| func scanner(typ reflect.Type) schema.ScannerFunc { | ||||
| 	if typ.Kind() == reflect.Interface { | ||||
| 		return scanInterface | ||||
| 	} | ||||
| 	return schema.Scanner(typ) | ||||
| } | ||||
| 
 | ||||
| func scanInterface(dest reflect.Value, src interface{}) error { | ||||
| 	if dest.IsNil() { | ||||
| 		dest.Set(reflect.ValueOf(src)) | ||||
| 		return nil | ||||
| 	} | ||||
| 
 | ||||
| 	dest = dest.Elem() | ||||
| 	if fn := scanner(dest.Type()); fn != nil { | ||||
| 		return fn(dest, src) | ||||
| 	} | ||||
| 	return fmt.Errorf("bun: can't scan %#v into %s", src, dest.Type()) | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue