mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 17:12: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
				
			
		
							
								
								
									
										9
									
								
								vendor/github.com/gin-gonic/gin/binding/protobuf.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/github.com/gin-gonic/gin/binding/protobuf.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -5,10 +5,11 @@ | |||
| package binding | ||||
| 
 | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"io/ioutil" | ||||
| 	"net/http" | ||||
| 
 | ||||
| 	"github.com/golang/protobuf/proto" | ||||
| 	"google.golang.org/protobuf/proto" | ||||
| ) | ||||
| 
 | ||||
| type protobufBinding struct{} | ||||
|  | @ -26,7 +27,11 @@ func (b protobufBinding) Bind(req *http.Request, obj interface{}) error { | |||
| } | ||||
| 
 | ||||
| func (protobufBinding) BindBody(body []byte, obj interface{}) error { | ||||
| 	if err := proto.Unmarshal(body, obj.(proto.Message)); err != nil { | ||||
| 	msg, ok := obj.(proto.Message) | ||||
| 	if !ok { | ||||
| 		return errors.New("obj is not ProtoMessage") | ||||
| 	} | ||||
| 	if err := proto.Unmarshal(body, msg); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	// Here it's same to return validate(obj), but util now we can't add | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue