- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 37 for Kata (0.14 sec)
-
src/bufio/scan.go
// an incorrectly encoded string. return 1, errorRune, nil } // dropCR drops a terminal \r from the data. func dropCR(data []byte) []byte { if len(data) > 0 && data[len(data)-1] == '\r' { return data[0 : len(data)-1] } return data } // ScanLines is a split function for a [Scanner] that returns each line of
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 14.2K bytes - Viewed (0) -
src/bufio/example_test.go
const input = "1,2,3,4," scanner := bufio.NewScanner(strings.NewReader(input)) // Define a split function that separates on commas. onComma := func(data []byte, atEOF bool) (advance int, token []byte, err error) { for i := 0; i < len(data); i++ { if data[i] == ',' { return i + 1, data[:i], nil } } if !atEOF { return 0, nil, nil } // There is one final token to be delivered, which may be the empty string.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 4.9K bytes - Viewed (0) -
lib/time/mkzip.go
if d.IsDir() { return nil } data, err := os.ReadFile(path) if err != nil { log.Fatal(err) } if strings.HasSuffix(path, ".zip") { log.Fatalf("unexpected file during walk: %s", path) } name := filepath.ToSlash(path) w, err := zw.CreateRaw(&zip.FileHeader{ Name: name, Method: zip.Store, CompressedSize64: uint64(len(data)), UncompressedSize64: uint64(len(data)),
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 17:32:07 GMT 2024 - 2.1K bytes - Viewed (0) -
src/archive/zip/reader.go
func (rc *ReadCloser) Close() error { return rc.f.Close() } // DataOffset returns the offset of the file's possibly-compressed // data, relative to the beginning of the zip file. // // Most callers should instead use [File.Open], which transparently // decompresses data and verifies checksums. func (f *File) DataOffset() (offset int64, err error) { bodyOffset, err := f.findBodyOffset() if err != nil { return
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
src/bytes/bytes_test.go
b.Run(fmt.Sprintf("%d", j), func(b *testing.B) { b.ReportAllocs() b.SetBytes(int64(j)) data := sd.data[:j] for i := 0; i < b.N; i++ { Fields(data) } }) } }) } } func BenchmarkFieldsFunc(b *testing.B) { for _, sd := range bytesdata { b.Run(sd.name, func(b *testing.B) { for j := 1 << 4; j <= 1<<20; j <<= 4 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/cmd/cgo/godefs.go
fmt.Fprintf(&buf, "\n") override := make(map[string]string) // Allow source file to specify override mappings. // For example, the socket data structures refer // to in_addr and in_addr6 structs but we want to be // able to treat them as byte arrays, so the godefs // inputs in package syscall say // // // +godefs map struct_in_addr [4]byte
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Sep 08 14:33:35 GMT 2022 - 4.5K bytes - Viewed (0) -
src/archive/zip/struct.go
// // It must be a relative path, not start with a drive letter (such as "C:"), // and must use forward slashes instead of back slashes. A trailing slash // indicates that this file is a directory and should have no data. Name string // Comment is any arbitrary user-defined string shorter than 64KiB. Comment string // NonUTF8 indicates that Name and Comment are not encoded in UTF-8. //
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 12.1K bytes - Viewed (0) -
src/archive/tar/writer.go
const longName = "././@LongLink" if len(hdr.Name) > nameSize { data := hdr.Name + "\x00" if err := tw.writeRawFile(longName, data, TypeGNULongName, FormatGNU); err != nil { return err } } if len(hdr.Linkname) > nameSize { data := hdr.Linkname + "\x00" if err := tw.writeRawFile(longName, data, TypeGNULongLink, FormatGNU); err != nil { return err } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0) -
src/bytes/reader_test.go
} if r.Len() != 0 { t.Errorf("reader contains %v bytes; want 0", r.Len()) } } } func TestReaderLen(t *testing.T) { const data = "hello world" r := NewReader([]byte(data)) if got, want := r.Len(), 11; got != want { t.Errorf("r.Len(): got %d, want %d", got, want) } if n, err := r.Read(make([]byte, 10)); err != nil || n != 10 {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Dec 13 18:45:54 GMT 2021 - 8K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
if name, abi, ok := p.funcAddress(); ok { fmt.Fprintf(w, "def %s %s\n", name, abi) } } return case "GLOBL", "PCDATA": // No text definitions or symbol references. case "DATA", "FUNCDATA": // For DATA, operands[0] is defined symbol. // For FUNCDATA, operands[0] is an immediate constant. // Remaining operands may have references. if len(operands) < 2 { return } operands = operands[1:]
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0)