Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 106 for repeat (0.15 sec)

  1. src/bufio/example_test.go

    		fmt.Println(scanner.Text()) // Println will add back the final '\n'
    	}
    	if err := scanner.Err(); err != nil {
    		fmt.Fprintln(os.Stderr, "reading standard input:", err)
    	}
    }
    
    // Return the most recent call to Scan as a []byte.
    func ExampleScanner_Bytes() {
    	scanner := bufio.NewScanner(strings.NewReader("gopher"))
    	for scanner.Scan() {
    		fmt.Println(len(scanner.Bytes()) == 6)
    	}
    	if err := scanner.Err(); err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  2. src/bufio/scan.go

    		return nil
    	}
    	return s.err
    }
    
    // Bytes returns the most recent token generated by a call to [Scanner.Scan].
    // The underlying array may point to data that will be overwritten
    // by a subsequent call to Scan. It does no allocation.
    func (s *Scanner) Bytes() []byte {
    	return s.token
    }
    
    // Text returns the most recent token generated by a call to [Scanner.Scan]
    // as a newly allocated string holding its bytes.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  3. cmd/site-replication.go

    	}
    
    	// FIXME: Ideally, we also need to check if there are any global IAM
    	// policies and any (LDAP user created) service accounts on the other
    	// peer clusters, and if so, reject the cluster replicate add request.
    	// This is not yet implemented.
    
    	// VALIDATIONS COMPLETE.
    
    	// Create a common service account for all clusters, with root
    	// permissions.
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
  4. cmd/object-api-utils.go

    	}
    	if !utf8.ValidString(object) {
    		return false
    	}
    	if strings.Contains(object, `//`) {
    		return false
    	}
    	// This is valid for AWS S3 but it will never
    	// work with file systems, we will reject here
    	// to return object name invalid rather than
    	// a cryptic error from the file system.
    	return !strings.ContainsRune(object, 0)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  5. internal/grid/connection.go

    	}
    }
    
    func (c *Connection) handleConnectMux(ctx context.Context, m message, subID *subHandlerID) {
    	// Stateless stream:
    	if m.Flags&FlagStateless != 0 {
    		// Reject for now, so we can safely add it later.
    		if true {
    			gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: "Stateless streams not supported"}))
    			return
    		}
    
    		var handler *StatelessHandler
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  6. cmd/bucket-replication.go

    			rd.Replicate = true
    			return
    		}
    		// For existing object reset - this condition is needed
    		rd.Replicate = tgtStatus == ""
    		return
    	}
    	if resetID == "" || resetBeforeDate.Equal(timeSentinel) { // no reset in progress
    		return
    	}
    
    	// if already replicated, return true if a new reset was requested.
    	splits := strings.SplitN(rs, ";", 2)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 112.2K bytes
    - Viewed (1)
  7. src/bytes/buffer_test.go

    	for _, growLen := range []int{0, 100, 1000, 10000, 100000} {
    		for _, startLen := range []int{0, 100, 1000, 10000, 100000} {
    			xBytes := Repeat(x, startLen)
    
    			buf := NewBuffer(xBytes)
    			// If we read, this affects buf.off, which is good to test.
    			readBytes, _ := buf.Read(tmp)
    			yBytes := Repeat(y, growLen)
    			allocs := testing.AllocsPerRun(100, func() {
    				buf.Grow(growLen)
    				buf.Write(yBytes)
    			})
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  8. cmd/bitrot_test.go

    	b := make([]byte, 10)
    	if _, err = reader.ReadAt(b, 0); err != nil {
    		t.Fatal(err)
    	}
    	if _, err = reader.ReadAt(b, 10); err != nil {
    		t.Fatal(err)
    	}
    	if _, err = reader.ReadAt(b, 20); err != nil {
    		t.Fatal(err)
    	}
    	if _, err = reader.ReadAt(b[:5], 30); err != nil {
    		t.Fatal(err)
    	}
    	if br, ok := reader.(io.Closer); ok {
    		br.Close()
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. cmd/object-api-putobject_test.go

    	if err != nil {
    		// Failed to create newbucket, abort.
    		t.Fatalf("%s : %s", instanceType, err.Error())
    	}
    
    	var (
    		nilBytes    []byte
    		data        = []byte("hello")
    		fiveMBBytes = bytes.Repeat([]byte("a"), 5*humanize.MiByte)
    	)
    	invalidMD5 := getMD5Hash([]byte("meh"))
    	invalidMD5Header := md5Header([]byte("meh"))
    
    	testCases := []struct {
    		bucketName    string
    		objName       string
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  10. internal/logger/target/kafka/kafka.go

    	// Reading logCh must hold read lock on logChMu (to avoid read race)
    	// Sending a value on logCh must hold read lock on logChMu (to avoid closing)
    	logCh   chan interface{}
    	logChMu sync.RWMutex
    
    	// store to persist and replay the logs to the target
    	// to avoid missing events when the target is down.
    	store          store.Store[interface{}]
    	storeCtxCancel context.CancelFunc
    
    	initKafkaOnce      once.Init
    	initQueueStoreOnce once.Init
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.1K bytes
    - Viewed (1)
Back to top