Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Must (0.13 sec)

  1. callbacks.go

    				}
    			} else if sortedIdx := getRIndex(sorted, c.before); sortedIdx != -1 {
    				if curIdx := getRIndex(sorted, c.name); curIdx == -1 {
    					// if before callback already sorted, append current callback just after it
    					sorted = append(sorted[:sortedIdx], append([]string{c.name}, sorted[sortedIdx:]...)...)
    				} else if curIdx > sortedIdx {
    					return fmt.Errorf("conflicting callback %s with before %s", c.name, c.before)
    				}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  2. tests/non_std_test.go

    	DB.First(&animal, animal.Counter)
    	if animal.Name != "galeone" {
    		t.Errorf("Name fields shouldn't be changed if untouched, but got %v", animal.Name)
    	}
    
    	// When changing a field with a default value, the change must occur
    	animal.Name = "amazing horse"
    	DB.Save(&animal)
    	DB.First(&animal, animal.Counter)
    	if animal.Name != "amazing horse" {
    		t.Errorf("Update a filed with a default value should occur. But got %v\n", animal.Name)
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.9K bytes
    - Viewed (0)
Back to top