Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 76 for newScanner (0.18 sec)

  1. src/runtime/internal/wasitest/nonblock_test.go

    			pr, pw := io.Pipe()
    			defer pw.Close()
    
    			subProcess.Stderr = pw
    
    			if err := subProcess.Start(); err != nil {
    				t.Fatal(err)
    			}
    
    			scanner := bufio.NewScanner(pr)
    			if !scanner.Scan() {
    				t.Fatal("expected line:", scanner.Err())
    			} else if scanner.Text() != "waiting" {
    				t.Fatal("unexpected output:", scanner.Text())
    			}
    
    			for _, fifo := range fifos {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 29 15:35:27 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  2. src/strconv/fp_test.go

    	}
    	return f1, true
    }
    
    func TestFp(t *testing.T) {
    	f, err := os.Open("testdata/testfp.txt")
    	if err != nil {
    		t.Fatal("testfp: open testdata/testfp.txt:", err)
    	}
    	defer f.Close()
    
    	s := bufio.NewScanner(f)
    
    	for lineno := 1; s.Scan(); lineno++ {
    		line := s.Text()
    		if len(line) == 0 || line[0] == '#' {
    			continue
    		}
    		a := strings.Split(line, " ")
    		if len(a) != 4 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 06 15:53:04 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  3. tools/istio-iptables/pkg/dependencies/stub.go

    	// We are either getting iptables rules as a `stdin` blob in `iptables-save` format (if this is a restore)
    	if stdin != nil {
    		buf := bufio.NewScanner(stdin)
    		for buf.Scan() {
    			stdincmd := buf.Text()
    			s.ExecutedAll = append(s.ExecutedAll, stdincmd)
    			s.ExecutedStdin = append(s.ExecutedStdin, stdincmd)
    		}
    	} else {
    		// ...or as discrete individual commands
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 11 17:46:23 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/testdata/hist.go

    	if len(os.Args) > 1 {
    		var err error
    		reader, err = os.Open(os.Args[1])
    		if err != nil {
    			fmt.Fprintf(os.Stderr, "There was an error opening %s: %v\n", os.Args[1], err)
    			return
    		}
    	}
    	scanner := bufio.NewScanner(reader)
    	for scanner.Scan() { //gdb-opt=(scanner/A)
    		s := scanner.Text()
    		i, err := strconv.ParseInt(s, 10, 64)
    		if err != nil { //gdb-dbg=(i) //gdb-opt=(err,hist,i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 23 18:05:07 UTC 2018
    - 2.4K bytes
    - Viewed (0)
  5. src/internal/trace/testtrace/expectation.go

    	}
    	return nil
    }
    
    // ParseExpectation parses the serialized form of an Expectation.
    func ParseExpectation(data []byte) (*Expectation, error) {
    	exp := new(Expectation)
    	s := bufio.NewScanner(bytes.NewReader(data))
    	if s.Scan() {
    		c := strings.SplitN(s.Text(), " ", 2)
    		switch c[0] {
    		case "SUCCESS":
    		case "FAILURE":
    			exp.failure = true
    			if len(c) != 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  6. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Mar 06 11:43:16 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/test_fuzz_mutator.txt

    	}
    	if string(bytes.TrimSpace(b)) != `FuzzB "seed"` {
    		return fmt.Errorf("coordinator: did not test FuzzB seed")
    	}
    	return nil
    }
    
    func checkWorkerLog(r io.Reader) error {
    	scan := bufio.NewScanner(r)
    	var sawAMutant bool
    	for scan.Scan() {
    		line := scan.Text()
    		if !strings.HasPrefix(line, "FuzzA ") {
    			return fmt.Errorf("worker: tested something other than target: %s", line)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 16:53:11 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  8. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/debug_lines_test.go

    	// this is an inlining reporting test, not an optimization test.  -N makes it less fragile
    	dumpBytes := compileAndDump(t, file, function, "-N")
    	dump := bufio.NewScanner(bytes.NewReader(dumpBytes))
    	dumpLineNum := 0
    	var gotStmts []int
    	var gotStacks [][]int
    	for dump.Scan() {
    		line := dump.Text()
    		dumpLineNum++
    		matches := inlineLine.FindStringSubmatch(line)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:24:52 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  10. src/cmd/vendor/github.com/google/pprof/profile/legacy_profile.go

    	return len(trimmed) == 0 || trimmed[0] == '#'
    }
    
    // parseGoCount parses a Go count profile (e.g., threadcreate or
    // goroutine) and returns a new Profile.
    func parseGoCount(b []byte) (*Profile, error) {
    	s := bufio.NewScanner(bytes.NewBuffer(b))
    	// Skip comments at the beginning of the file.
    	for s.Scan() && isSpaceOrComment(s.Text()) {
    	}
    	if err := s.Err(); err != nil {
    		return nil, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 22 18:58:12 UTC 2022
    - 32.8K bytes
    - Viewed (0)
Back to top