fix linter
This commit is contained in:
		
							parent
							
								
									273cf6491f
								
							
						
					
					
						commit
						40b4998893
					
				| @ -127,7 +127,7 @@ func Create(config *Config) func(db *gorm.DB) { | |||||||
| 		insertOk := err == nil && insertID > 0 | 		insertOk := err == nil && insertID > 0 | ||||||
| 
 | 
 | ||||||
| 		if !insertOk { | 		if !insertOk { | ||||||
| 			if db.Config.IgnoreLastInsertIDWhenNotSupport { | 			if db.IgnoreLastInsertIDWhenNotSupport { | ||||||
| 				_, rowsAffectedErr := driver.RowsAffected(0).LastInsertId() | 				_, rowsAffectedErr := driver.RowsAffected(0).LastInsertId() | ||||||
| 				if strings.Compare(err.Error(), rowsAffectedErr.Error()) == 0 { | 				if strings.Compare(err.Error(), rowsAffectedErr.Error()) == 0 { | ||||||
| 					return | 					return | ||||||
| @ -136,7 +136,7 @@ func Create(config *Config) func(db *gorm.DB) { | |||||||
| 				if strings.Compare(err.Error(), resultNoRowsErr.Error()) == 0 { | 				if strings.Compare(err.Error(), resultNoRowsErr.Error()) == 0 { | ||||||
| 					return | 					return | ||||||
| 				} | 				} | ||||||
| 				if db.Config.IsNotSupportLastInsertIDErr != nil && db.Config.IsNotSupportLastInsertIDErr(err) { | 				if db.IsNotSupportLastInsertIDErr != nil && db.IsNotSupportLastInsertIDErr(err) { | ||||||
| 					return | 					return | ||||||
| 				} | 				} | ||||||
| 				if db.Logger != nil { | 				if db.Logger != nil { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Krisdiano
						Krisdiano