Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for drop (0.16 sec)

  1. src/bufio/bufio.go

    	}
    
    	if len(line) == 0 {
    		if err != nil {
    			line = nil
    		}
    		return
    	}
    	err = nil
    
    	if line[len(line)-1] == '\n' {
    		drop := 1
    		if len(line) > 1 && line[len(line)-2] == '\r' {
    			drop = 2
    		}
    		line = line[:len(line)-drop]
    	}
    	return
    }
    
    // collectFragments reads until the first occurrence of delim in the input. It
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  2. tests/tests_test.go

    	DB.Migrator().DropTable("user_friends", "user_speaks")
    
    	if err = DB.Migrator().DropTable(allModels...); err != nil {
    		log.Printf("Failed to drop table, got error %v\n", err)
    		os.Exit(1)
    	}
    
    	if err = DB.AutoMigrate(allModels...); err != nil {
    		log.Printf("Failed to auto migrate, but got error %v\n", err)
    		os.Exit(1)
    	}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  3. cmd/metacache.go

    	}
    
    	if m.status == scanStateStarted && update.status != scanStateStarted {
    		m.status = update.status
    	}
    
    	if m.status == scanStateStarted && time.Since(m.lastHandout) > metacacheMaxClientWait {
    		// Drop if client hasn't been seen for 3 minutes.
    		m.status = scanStateError
    		m.error = "client not seen"
    	}
    
    	if m.error == "" && update.error != "" {
    		m.error = update.error
    		m.status = scanStateError
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/informers.go

    	// test flakes with the fake kube client in `pkg/kube/client.go` -
    	// because we are using `List()` in the handler, without this requeue,
    	// the fake client will sometimes drop pod events leading to test flakes.
    	//
    	// WaitForCacheSync *helps*, but does not entirely fix this problem
    	s.namespaces = kclient.New[*corev1.Namespace](kubeClient)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  5. migrator/migrator.go

    			return err
    		}
    	}
    	return nil
    }
    
    // DropTable drop table for values
    func (m Migrator) DropTable(values ...interface{}) error {
    	values = m.ReorderModels(values, false)
    	for i := len(values) - 1; i >= 0; i-- {
    		tx := m.DB.Session(&gorm.Session{})
    		if err := m.RunWithValue(values[i], func(stmt *gorm.Statement) error {
    			return tx.Exec("DROP TABLE IF EXISTS ?", m.CurrentTable(stmt)).Error
    		}); err != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  6. cni/pkg/plugin/plugin_dryrun_test.go

    		},
    		{
    			name:        "invalid-drop",
    			annotations: map[string]string{annotation.SidecarStatus.Name: "true"},
    			proxyEnv:    []corev1.EnvVar{{Name: cmd.InvalidDropByIptables, Value: "true"}},
    			golden:      filepath.Join(env.IstioSrc, "cni/pkg/plugin/testdata/invalid-drop.txt.golden"),
    		},
    		{
    			name:        "custom-uid",
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. cmd/data-usage-cache.go

    	// drive timeout by default is 2 minutes, we do not need to wait longer.
    	return save(name, time.Minute)
    }
    
    // dataUsageCacheVer indicates the cache version.
    // Bumping the cache version will drop data from previous versions
    // and write new data with the new version.
    const (
    	dataUsageCacheVerCurrent = 8
    	dataUsageCacheVerV7      = 7
    	dataUsageCacheVerV6      = 6
    	dataUsageCacheVerV5      = 5
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 41.4K bytes
    - Viewed (1)
  8. internal/handlers/forwarder.go

    }
    
    type bufPool struct {
    	sz   int
    	pool sync.Pool
    }
    
    func (b *bufPool) Put(buf []byte) {
    	if cap(buf) < b.sz || cap(buf) > b.sz*2 {
    		// Buffer too small or will likely leak memory after being expanded.
    		// Drop it.
    		return
    	}
    	b.pool.Put(&buf)
    }
    
    func (b *bufPool) Get() []byte {
    	bufp := b.pool.Get().(*[]byte)
    	return (*bufp)[:b.sz]
    }
    
    func newBufPool(sz int) httputil.BufferPool {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 07 05:42:10 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  9. tests/migrate_test.go

    		t.Fatalf("Failed to drop view, got %v", err)
    	}
    
    	query = DB.Model(&User{}).Where("age > ?", 20)
    	if err := DB.Migrator().CreateView("users_view", gorm.ViewOption{Query: query}); err != nil {
    		t.Fatalf("Failed to crate view, got %v", err)
    	}
    	if err := DB.Migrator().DropView("users_view"); err != nil {
    		t.Fatalf("Failed to drop view, got %v", err)
    	}
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  10. cni/pkg/plugin/sidecar_redirect.go

    		// parse and set the bool value of invalidDrop
    		redir.invalidDrop, valErr = strconv.ParseBool(v)
    		if valErr != nil {
    			log.Warnf("cannot parse invalid drop environment variable %v", valErr)
    		}
    	}
    	return redir, nil
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
Back to top