Linting and optimizing struct memory signature. (#1184)
* fix cleanPath spell (#969) * linter and optimize structs
This commit is contained in:
		
				
					committed by
					
						 Bo-Yi Wu
						Bo-Yi Wu
					
				
			
			
				
	
			
			
			
						parent
						
							eeb57848ca
						
					
				
				
					commit
					6f94fd05c9
				
			| @ -179,12 +179,3 @@ func setTimeField(val string, structField reflect.StructField, value reflect.Val | ||||
| 	value.Set(reflect.ValueOf(t)) | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| // Don't pass in pointers to bind to. Can lead to bugs. See: | ||||
| // https://github.com/codegangsta/martini-contrib/issues/40 | ||||
| // https://github.com/codegangsta/martini-contrib/pull/34#issuecomment-29683659 | ||||
| func ensureNotPointer(obj interface{}) { | ||||
| 	if reflect.TypeOf(obj).Kind() == reflect.Ptr { | ||||
| 		panic("Pointers are not accepted as binding models") | ||||
| 	} | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user