- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for NewScanner (0.1 sec)
-
src/bufio/scan_test.go
func TestBadReader(t *testing.T) { scanner := NewScanner(endlessZeros{}) for scanner.Scan() { t.Fatal("read should fail") } err := scanner.Err() if err != io.ErrNoProgress { t.Errorf("unexpected error: %v", err) } } func TestScanWordsExcessiveWhiteSpace(t *testing.T) { const word = "ipsum" s := strings.Repeat(" ", 4*smallMaxTokenSize) + word scanner := NewScanner(strings.NewReader(s))
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0) -
src/bufio/scan.go
// may need to include, for instance, a newline. MaxScanTokenSize = 64 * 1024 startBufSize = 4096 // Size of initial allocation for buffer. ) // NewScanner returns a new [Scanner] to read from r. // The split function defaults to [ScanLines]. func NewScanner(r io.Reader) *Scanner { return &Scanner{ r: r, split: ScanLines, maxTokenSize: MaxScanTokenSize, } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 23 09:06:30 UTC 2023 - 14.2K bytes - Viewed (0) -
cni/pkg/nodeagent/podcgroupns.go
// - https://www.kernel.org/doc/Documentation/cgroup-v2.txt func GetCgroups(procCgroupData bytes.Buffer) ([]Cgroup, error) { reader := bytes.NewReader(procCgroupData.Bytes()) var cgroups []Cgroup scanner := bufio.NewScanner(reader) for scanner.Scan() { token := scanner.Text() substrings := strings.SplitN(token, ":", 3) if len(substrings) < 3 {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Apr 12 21:47:31 UTC 2024 - 11K bytes - Viewed (0) -
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 Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 18:23:41 UTC 2024 - 37.7K bytes - Viewed (0) -
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 Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 13.5K bytes - Viewed (0) -
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 Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 18.7K bytes - Viewed (0) -
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 Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 21:50:11 UTC 2024 - 31.7K bytes - Viewed (0) -
cmd/streaming-signature-v4.go
} // 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 16 23:13:47 UTC 2024 - 18.2K bytes - Viewed (0)