Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for newScanner (0.04 sec)

  1. internal/s3select/jstream/scanner_test.go

    )
    
    func TestScanner(t *testing.T) {
    	t.Skip("Unstable test")
    	data := []byte("abcdefghijklmnopqrstuvwxyz0123456789")
    
    	var i int
    	r := bytes.NewReader(data)
    	scanner := newScanner(r)
    	for scanner.pos < atomic.LoadInt64(&scanner.end) {
    		c := scanner.next()
    		if scanner.readerErr != nil {
    			t.Fatal(scanner.readerErr)
    		}
    		if c != data[i] {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  2. internal/s3select/jstream/scanner.go

    	nbuf      [chunk]byte     // next internal buffer
    	fillReq   chan struct{}
    	fillReady chan int64
    	readerErr error // underlying reader error, if any
    }
    
    func newScanner(r io.Reader) *scanner {
    	sr := &scanner{
    		end:       maxInt,
    		fillReq:   make(chan struct{}),
    		fillReady: make(chan int64),
    	}
    
    	go func() {
    		var rpos int64 // total bytes read into buffer
    
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Mon Sep 23 19:35:41 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. cmd/streaming-v4-unsigned.go

    		}
    		break
    	}
    
    	// Parse trailers.
    	wantTrailers := make(map[string]struct{}, len(cr.trailers))
    	for k := range cr.trailers {
    		wantTrailers[strings.ToLower(k)] = struct{}{}
    	}
    	input := bufio.NewScanner(bytes.NewReader(valueBuffer.Bytes()))
    	for input.Scan() {
    		line := strings.TrimSpace(input.Text())
    		if line == "" {
    			continue
    		}
    		// Find first separator.
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Thu Apr 03 14:55:52 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  4. docs/debugging/pprofgoparser/main.go

    	}
    
    	bf := bytes.Buffer{}
    
    	save := func(s string) {
    		bf.WriteString(s + "\n")
    	}
    	reset := func() {
    		bf.Reset()
    	}
    
    	ret := make(map[time.Duration][]string)
    
    	s := bufio.NewScanner(f)
    	s.Split(bufio.ScanLines)
    
    	var (
    		t            time.Duration
    		skip, record bool
    	)
    
    	for s.Scan() {
    		line := s.Text()
    		switch {
    		case skip && line != "":
    		case skip && line == "":
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Wed Mar 06 11:43:16 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. docs/debugging/hash-set/main.go

    	if file != "" {
    		distrib := make([][]string, setCount)
    		b, err := os.ReadFile(file)
    		if err != nil {
    			log.Fatalln(err)
    		}
    		b = bytes.ReplaceAll(b, []byte("\r"), []byte{})
    		sc := bufio.NewScanner(bytes.NewBuffer(b))
    		for sc.Scan() {
    			object = strings.TrimSpace(sc.Text())
    			set := sipHashMod(prefix+object, setCount, id)
    			distrib[set] = append(distrib[set], prefix+object)
    		}
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  6. docs/debugging/reorder-disks/main.go

    	result := make(map[string]string)
    
    	mountInfo, err := os.Open("/proc/self/mountinfo")
    	if err != nil {
    		return nil, err
    	}
    	defer mountInfo.Close()
    
    	scanner := bufio.NewScanner(mountInfo)
    	for scanner.Scan() {
    		s := strings.Split(scanner.Text(), " ")
    		if len(s) != 11 {
    			return nil, errors.New("unsupported /proc/self/mountinfo format")
    		}
    		result[s[2]] = s[9]
    	}
    
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  7. internal/config/config.go

    }
    
    // Config - MinIO server config structure.
    type Config map[string]map[string]KVS
    
    // DelFrom - deletes all keys in the input reader.
    func (c Config) DelFrom(r io.Reader) error {
    	scanner := bufio.NewScanner(r)
    	for scanner.Scan() {
    		// Skip any empty lines, or comment like characters
    		text := scanner.Text()
    		if text == "" || strings.HasPrefix(text, KvComment) {
    			continue
    		}
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 37.7K bytes
    - Viewed (0)
  8. internal/s3select/jstream/decoder.go

    // emitDepth from the provider io.Reader.
    // If emitDepth is < 0, values at every depth will be emitted.
    func NewDecoder(r io.Reader, emitDepth int) *Decoder {
    	d := &Decoder{
    		scanner:   newScanner(r),
    		emitDepth: emitDepth,
    		scratch:   &scratch{data: make([]byte, 1024)},
    		metaCh:    make(chan *MetaValue, 128),
    	}
    	if emitDepth < 0 {
    		d.emitDepth = 0
    		d.emitRecursive = true
    	}
    	return d
    }
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  9. cmd/update.go

    			ctx := logger.SetReqInfo(GlobalContext, reqInfo)
    			internalLogIf(ctx, err)
    		}
    		return ""
    	}
    	defer helmInfoFile.Close()
    	scanner := bufio.NewScanner(helmInfoFile)
    	for scanner.Scan() {
    		if strings.Contains(scanner.Text(), "chart=") {
    			helmChartVersion := strings.TrimPrefix(scanner.Text(), "chart=")
    			// remove quotes from the chart version
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 18.9K bytes
    - Viewed (0)
  10. cmd/common-main.go

    func minioEnvironFromFile(envConfigFile string) ([]envKV, error) {
    	f, err := Open(envConfigFile)
    	if err != nil {
    		return nil, err
    	}
    	defer f.Close()
    	var ekvs []envKV
    	scanner := bufio.NewScanner(f)
    	for scanner.Scan() {
    		ekv, err := parsEnvEntry(scanner.Text())
    		if err != nil {
    			return nil, err
    		}
    		if ekv.Skip {
    			// Skips empty lines
    			continue
    		}
    		ekvs = append(ekvs, ekv)
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 32.5K bytes
    - Viewed (3)
Back to top