- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 76 for newScanner (0.51 sec)
-
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 Jun 16 00:44:34 UTC 2024 - Last Modified: Thu May 30 11:58:12 UTC 2024 - 31.5K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy_test.go
if err != nil { t.Error(err) return } defer c.Close() io.WriteString(c, "HTTP/1.1 101 Switching Protocols\r\nConnection: upgrade\r\nUpgrade: WebSocket\r\n\r\n") bs := bufio.NewScanner(c) if !bs.Scan() { t.Errorf("backend failed to read line from client: %v", bs.Err()) return } fmt.Fprintf(c, "backend got %q\n", bs.Text()) })) defer backendServer.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 54.6K bytes - Viewed (0) -
pkg/util/iptables/iptables.go
if line < 1 { return nil } start := line - count if start <= 0 { start = 1 } end := line + count + 1 offset := 1 scanner := bufio.NewScanner(bytes.NewBuffer(lines)) extractLines := make([]LineData, 0, count*2) for scanner.Scan() { if offset >= start && offset < end { extractLines = append(extractLines, LineData{ Line: offset,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 19 01:20:51 UTC 2023 - 28.6K bytes - Viewed (0) -
src/cmd/doc/pkg.go
// a unit before adding the leading // to each line. docBuf := new(bytes.Buffer) pkg.ToText(docBuf, field.Doc.Text(), "", indent) scanner := bufio.NewScanner(docBuf) for scanner.Scan() { fmt.Fprintf(&pkg.buf, "%s// %s\n", indent, scanner.Bytes()) } } s := pkg.oneLineNode(field.Type) lineComment := "" if field.Comment != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 20:15:52 UTC 2024 - 32K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go
if !ok { return fmt.Errorf("does not refer to a valid field") } schema = &val } return nil } validFieldPath = nil scanner := bufio.NewScanner(strings.NewReader(jsonPath)) // configure the scanner to split the string into tokens. // The three delimiters ('.', '[', ']') will be returned as single char tokens.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 20 18:21:31 UTC 2024 - 32.2K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/internal/report/source.go
lines = []string{""} // Skip 0th line f, err := openSourceFile(path, reader.searchPath, reader.trimPath) if err != nil { reader.errors[path] = err } else { s := bufio.NewScanner(f) for s.Scan() { lines = append(lines, s.Text()) } f.Close() if s.Err() != nil { reader.errors[path] = err } } reader.files[path] = lines }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 31 19:48:28 UTC 2024 - 31.3K bytes - Viewed (0) -
cmd/kubeadm/app/preflight/checks.go
f, err := os.Open("/proc/swaps") if err != nil { // /proc/swaps not available, thus no reasons to warn return nil, nil } defer f.Close() var buf []string scanner := bufio.NewScanner(f) for scanner.Scan() { buf = append(buf, scanner.Text()) } if err := scanner.Err(); err != nil { return []error{errors.Wrap(err, "error parsing /proc/swaps")}, nil } if len(buf) > 1 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 03 11:20:55 UTC 2024 - 39.5K bytes - Viewed (0) -
src/cmd/go/internal/work/action.go
} } } else { pkglistbytes, err := buildid.ReadELFNote(shlibpath, "Go\x00\x00", 1) if err != nil { base.Fatalf("readELFNote failed: %v", err) } scanner := bufio.NewScanner(bytes.NewBuffer(pkglistbytes)) for scanner.Scan() { t := scanner.Text() pkgs = append(pkgs, load.LoadPackageWithFlags(t, base.Cwd(), &stk, nil, 0)) } } return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 15:39:17 UTC 2024 - 32.7K bytes - Viewed (0) -
src/cmd/cgo/internal/testshared/shared_test.go
c := exec.Command("../../bin/exe") output, err := c.CombinedOutput() if err == nil { t.Fatal("executing exe did not fail after ABI break") } scanner := bufio.NewScanner(bytes.NewReader(output)) foundMsg := false const wantPrefix = "abi mismatch detected between the executable and lib" for scanner.Scan() { if strings.HasPrefix(scanner.Text(), wantPrefix) { foundMsg = true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Aug 26 01:54:41 UTC 2023 - 36.3K bytes - Viewed (0) -
src/cmd/link/link_test.go
if oerr != nil { t.Fatalf("failed to objdump blah.o: %v, output: %s\n", oerr, out) } // Sift through the output; we should not be seeing any R_TLS_LE relocs. scanner := bufio.NewScanner(bytes.NewReader(out)) for scanner.Scan() { line := scanner.Text() if strings.Contains(line, "R_TLS_LE") { t.Errorf("objdump output contains unexpected R_TLS_LE reloc: %s", line) } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 20:26:02 UTC 2024 - 43.5K bytes - Viewed (0)