Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 76 for newScanner (0.18 sec)

  1. pkg/volume/util/fsquota/common/quota_common_linux_impl.go

    	mounts, err := os.Open(MountsFile)
    	if err != nil {
    		return "", fmt.Errorf("cannot open mounts file %s: %v", MountsFile, err)
    	}
    	defer mounts.Close()
    
    	scanner := bufio.NewScanner(mounts)
    	for scanner.Scan() {
    		match := MountParseRegexp.FindStringSubmatch(scanner.Text())
    		if match != nil {
    			mount := match[2]
    			if mount == mountpoint {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  2. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 37.8K bytes
    - Viewed (0)
  3. src/crypto/ed25519/ed25519_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	defer testDataZ.Close()
    	testData, err := gzip.NewReader(testDataZ)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer testData.Close()
    
    	scanner := bufio.NewScanner(testData)
    	lineNo := 0
    
    	for scanner.Scan() {
    		lineNo++
    
    		line := scanner.Text()
    		parts := strings.Split(line, ":")
    		if len(parts) != 5 {
    			t.Fatalf("bad number of parts on line %d", lineNo)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. pkg/volume/util/fsquota/project.go

    		}
    	}
    	return projectType{true, common.BadQuotaID, "", l}
    }
    
    func parseProjFile(f *os.File, parser func(l string) projectType) []projectType {
    	var answer []projectType
    	scanner := bufio.NewScanner(f)
    	for scanner.Scan() {
    		answer = append(answer, parser(scanner.Text()))
    	}
    	return answer
    }
    
    func readProjectFiles(projects *os.File, projid *os.File) projectsList {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/util/yaml/decoder.go

    // returned if the entire buffer could not be read to assist
    // the caller in framing the chunk.
    func NewDocumentDecoder(r io.ReadCloser) io.ReadCloser {
    	scanner := bufio.NewScanner(r)
    	// the size of initial allocation for buffer 4k
    	buf := make([]byte, 4*1024)
    	// the maximum size used to buffer a token 5M
    	scanner.Buffer(buf, 5*1024*1024)
    	scanner.Split(splitYAMLDocument)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 19 21:24:36 UTC 2021
    - 10.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/amd64/versions_test.go

    			}
    		})
    		re = regexp.MustCompile(`^\s*([\da-f]+):\s*((?:[\da-f][\da-f] )+)\s*([a-z\d]+)`)
    	}
    
    	// Find all the instruction addresses we need to edit.
    	virtualEdits := map[uint64]bool{}
    	scanner := bufio.NewScanner(disasm)
    	for scanner.Scan() {
    		line := scanner.Text()
    		parts := re.FindStringSubmatch(line)
    		if len(parts) == 0 {
    			continue
    		}
    		addr, err := strconv.ParseUint(parts[1], 16, 64)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:19:15 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/util/yaml/decoder_test.go

    			t.Fatalf("unexpected body: %d / %v", n, err)
    		}
    		if string(b[:n]) != " \n{}" {
    			t.Fatalf("unexpected body: %q", string(b[:n]))
    		}
    	}
    }
    
    func TestScanYAML(t *testing.T) {
    	s := bufio.NewScanner(bytes.NewReader([]byte(`---
    stuff: 1
    
    ---
      `)))
    	s.Split(splitYAMLDocument)
    	if !s.Scan() {
    		t.Fatalf("should have been able to scan")
    	}
    	t.Logf("scan: %s", s.Text())
    	if !s.Scan() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 07:29:34 UTC 2023
    - 12.4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/test/pgo_inl_test.go

    	gcflag := fmt.Sprintf("-m -m -pgoprofile=%s -d=pgoinlinebudget=160,pgoinlinecdfthreshold=90", profFile)
    	out := buildPGOInliningTest(t, dir, gcflag)
    
    	scanner := bufio.NewScanner(bytes.NewReader(out))
    	curPkg := ""
    	canInline := regexp.MustCompile(`: can inline ([^ ]*)`)
    	haveInlined := regexp.MustCompile(`: inlining call to ([^ ]*)`)
    	cannotInline := regexp.MustCompile(`: cannot inline ([^ ]*): (.*)`)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  9. pkg/volume/util/fsquota/quota_linux.go

    func detectBackingDevInternal(mountpoint string, mounts string) (string, error) {
    	file, err := os.Open(mounts)
    	if err != nil {
    		return "", err
    	}
    	defer file.Close()
    	scanner := bufio.NewScanner(file)
    	for scanner.Scan() {
    		match := common.MountParseRegexp.FindStringSubmatch(scanner.Text())
    		if match != nil {
    			device := match[1]
    			mount := match[2]
    			if mount == mountpoint {
    				return device, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 07 08:07:51 UTC 2023
    - 14.1K bytes
    - Viewed (0)
  10. src/net/smtp/smtp_test.go

    }
    
    // smtp server, finely tailored to deal with our own client only!
    func serverHandle(c net.Conn, t *testing.T) error {
    	send := smtpSender{c}.send
    	send("220 127.0.0.1 ESMTP service ready")
    	s := bufio.NewScanner(c)
    	for s.Scan() {
    		switch s.Text() {
    		case "EHLO localhost":
    			send("250-127.0.0.1 ESMTP offers a warm hug of welcome")
    			send("250-STARTTLS")
    			send("250 Ok")
    		case "STARTTLS":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
Back to top