Address lint issues
This commit is contained in:
		
							parent
							
								
									c9984634ac
								
							
						
					
					
						commit
						904b1289a4
					
				| @ -294,7 +294,7 @@ find: | ||||
| 		} else { | ||||
| 			primaryValue, zero := result.Statement.Schema.PrioritizedPrimaryField.ValueOf(tx.Statement.Context, resultsValue.Index(resultsValue.Len()-1)) | ||||
| 			if zero { | ||||
| 				tx.AddError(ErrPrimaryKeyRequired) | ||||
| 				tx.AddError(ErrPrimaryKeyRequired) //nolint:typecheck,errcheck,gosec
 | ||||
| 				break | ||||
| 			} | ||||
| 			queryDB = tx.Clauses(clause.Gt{Column: clause.Column{Table: clause.CurrentTable, Name: clause.PrimaryKey}, Value: primaryValue}) | ||||
|  | ||||
| @ -144,19 +144,19 @@ func (stmt *Statement) QuoteTo(writer clause.Writer, field interface{}) { | ||||
| 				} else { | ||||
| 					write(v.Raw, v.Table) | ||||
| 				} | ||||
| 				writer.WriteByte('.') | ||||
| 				writer.WriteByte('.') //nolint:typecheck,errcheck,gosec
 | ||||
| 			} | ||||
| 
 | ||||
| 			if v.Name == clause.PrimaryKey { | ||||
| 				switch { | ||||
| 				case stmt.Schema == nil: | ||||
| 					stmt.DB.AddError(ErrModelValueRequired) //nolint:typecheck,errcheck,gosec
 | ||||
| 					stmt.DB.AddError(ErrModelValueRequired) //nolint:typecheck,errcheck,gosec,staticcheck
 | ||||
| 				case stmt.Schema.PrioritizedPrimaryField != nil: | ||||
| 					write(v.Raw, stmt.Schema.PrioritizedPrimaryField.DBName) | ||||
| 				case len(stmt.Schema.DBNames) > 0: | ||||
| 					write(v.Raw, stmt.Schema.DBNames[0]) | ||||
| 				default: | ||||
| 					stmt.DB.AddError(ErrModelAccessibleFieldsRequired) //nolint:typecheck,errcheck,gosec
 | ||||
| 					stmt.DB.AddError(ErrModelAccessibleFieldsRequired) //nolint:typecheck,errcheck,gosec,staticcheck
 | ||||
| 				} | ||||
| 			} else { | ||||
| 				write(v.Raw, v.Name) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Keith Martin
						Keith Martin