perf: use strings.IndexByte to replace strings.Index
This commit is contained in:
		
							parent
							
								
									a9d27293de
								
							
						
					
					
						commit
						7baa7e74ec
					
				| @ -105,7 +105,7 @@ func parseFieldIndexes(field *Field) (indexes []Index, err error) { | ||||
| 				var ( | ||||
| 					name       string | ||||
| 					tag        = strings.Join(v[1:], ":") | ||||
| 					idx        = strings.Index(tag, ",") | ||||
| 					idx        = strings.IndexByte(tag, ',') | ||||
| 					tagSetting = strings.Join(strings.Split(tag, ",")[1:], ",") | ||||
| 					settings   = ParseTagSetting(tagSetting, ",") | ||||
| 					length, _  = strconv.Atoi(settings["LENGTH"]) | ||||
|  | ||||
| @ -675,7 +675,7 @@ func (rel *Relationship) ParseConstraint() *Constraint { | ||||
| 
 | ||||
| 	var ( | ||||
| 		name     string | ||||
| 		idx      = strings.Index(str, ",") | ||||
| 		idx      = strings.IndexByte(str, ',') | ||||
| 		settings = ParseTagSetting(str, ",") | ||||
| 	) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 1911860538
						1911860538