Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 70 for newobj (0.17 sec)

  1. src/cmd/compile/internal/ir/const.go

    	panic("unreachable")
    }
    
    var (
    	intZero     = constant.MakeInt64(0)
    	floatZero   = constant.ToFloat(intZero)
    	complexZero = constant.ToComplex(intZero)
    )
    
    // NewOne returns an OLITERAL representing 1 with the given type.
    func NewOne(pos src.XPos, typ *types.Type) Node {
    	var val constant.Value
    	switch {
    	case typ.IsInteger():
    		val = intOne
    	case typ.IsFloat():
    		val = floatOne
    	case typ.IsComplex():
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 18:53:26 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/generic/policy_source_test.go

    	// totally fudged deepcopy
    	newFP := &FakePolicy{}
    	*newFP = *fp
    	return newFP
    }
    
    func (fb *FakeBinding) DeepCopyObject() runtime.Object {
    	// totally fudged deepcopy
    	newFB := &FakeBinding{}
    	*newFB = *fb
    	return newFB
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. pkg/controller/ttlafterfinished/ttlafterfinished_controller_test.go

    	"time"
    
    	batchv1 "k8s.io/api/batch/v1"
    	corev1 "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/klog/v2"
    	"k8s.io/klog/v2/ktesting"
    	"k8s.io/utils/pointer"
    )
    
    func newJob(completionTime, failedTime metav1.Time, ttl *int32) *batchv1.Job {
    	j := &batchv1.Job{
    		TypeMeta: metav1.TypeMeta{Kind: "Job"},
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      "foobar",
    			Namespace: metav1.NamespaceDefault,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 18 18:46:26 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  4. callbacks/callmethod.go

    package callbacks
    
    import (
    	"reflect"
    
    	"gorm.io/gorm"
    )
    
    func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) {
    	tx := db.Session(&gorm.Session{NewDB: true})
    	if called := fc(db.Statement.ReflectValue.Interface(), tx); !called {
    		switch db.Statement.ReflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			db.Statement.CurDestIndex = 0
    			for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 18 01:20:29 UTC 2023
    - 846 bytes
    - Viewed (0)
  5. pkg/registry/batch/cronjob/strategy.go

    			fieldpath.MakePathOrDie("spec"),
    		),
    	}
    }
    
    func (cronJobStatusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) {
    	newJob := obj.(*batch.CronJob)
    	oldJob := old.(*batch.CronJob)
    	newJob.Spec = oldJob.Spec
    }
    
    func (cronJobStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
    	return field.ErrorList{}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 15:14:03 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  6. callbacks/delete.go

    			case schema.HasOne, schema.HasMany:
    				queryConds := rel.ToQueryConditions(db.Statement.Context, db.Statement.ReflectValue)
    				modelValue := reflect.New(rel.FieldSchema.ModelType).Interface()
    				tx := db.Session(&gorm.Session{NewDB: true}).Model(modelValue)
    				withoutConditions := false
    				if db.Statement.Unscoped {
    					tx = tx.Unscoped()
    				}
    
    				if len(db.Statement.Selects) > 0 {
    					selects := make([]string, 0, len(db.Statement.Selects))
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Feb 25 02:48:23 UTC 2022
    - 5.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/audit/request.go

    			return nil, false, err
    		}
    	}
    
    	if isTable {
    		table := copy.(*metav1.Table)
    		for i := range table.Rows {
    			rowObj := table.Rows[i].Object
    			if err := removeManagedFields(rowObj.Object); err != nil {
    				return nil, false, err
    			}
    		}
    	}
    
    	return copy, true, nil
    }
    
    func removeManagedFields(obj runtime.Object) error {
    	if obj == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/registry.go

    		volumezone.Name:                      volumezone.New,
    		nodevolumelimits.CSIName:             runtime.FactoryAdapter(fts, nodevolumelimits.NewCSI),
    		nodevolumelimits.EBSName:             runtime.FactoryAdapter(fts, nodevolumelimits.NewEBS),
    		nodevolumelimits.GCEPDName:           runtime.FactoryAdapter(fts, nodevolumelimits.NewGCEPD),
    		nodevolumelimits.AzureDiskName:       runtime.FactoryAdapter(fts, nodevolumelimits.NewAzureDisk),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 5K bytes
    - Viewed (0)
  9. src/internal/fuzz/encoding_test.go

    			}
    			if err != nil {
    				t.Fatalf("unmarshal unexpected error: %v", err)
    			}
    			newB := marshalCorpusFile(vals...)
    			if newB[len(newB)-1] != '\n' {
    				t.Error("didn't write final newline to corpus file")
    			}
    
    			want := test.want
    			if want == "" {
    				want = test.in
    			}
    			want += "\n"
    			got := string(newB)
    			if got != want {
    				t.Errorf("unexpected marshaled value\ngot:\n%s\nwant:\n%s", got, want)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 00:20:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. tests/connpool_test.go

    		t.Fatalf("Should not find record after rollback, but got %v", err)
    	}
    
    	txDB := db.Where("fake_name = ?", "fake_name")
    	tx2 := txDB.Session(&gorm.Session{NewDB: true}).Begin()
    	user2 := *GetUser("transaction-2", Config{})
    	if err = tx2.Save(&user2).Error; err != nil {
    		t.Fatalf("No error should raise, but got %v", err)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Feb 06 02:54:40 UTC 2024
    - 5.5K bytes
    - Viewed (0)
Back to top