- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 158 for original (0.09 sec)
-
src/encoding/json/scanner_test.go
t.Fatalf("Indent error: %v", err) } b1 := buf1.Bytes() if !bytes.Equal(b1, b) { t.Error("Indent(Indent(jsonBig)) != Indent(jsonBig):") diff(t, b1, b) return } // should get back to original buf1.Reset() if err := Compact(&buf1, b); err != nil { t.Fatalf("Compact error: %v", err) } b1 = buf1.Bytes() if !bytes.Equal(b1, jsonBig) { t.Error("Compact(Indent(jsonBig)) != jsonBig:")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 25 16:00:37 UTC 2023 - 6.9K bytes - Viewed (0) -
src/net/url/example_test.go
q := u.Query() q.Set("q", "golang") u.RawQuery = q.Encode() fmt.Println(u) // Output: https://google.com/search?q=golang } func ExampleURL_roundtrip() { // Parse + String preserve the original encoding. u, err := url.Parse("https://example.com/foo%2fbar") if err != nil { log.Fatal(err) } fmt.Println(u.Path) fmt.Println(u.RawPath) fmt.Println(u.String()) // Output: // /foo/bar
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 7.2K bytes - Viewed (0) -
src/slices/sort.go
func SortFunc[S ~[]E, E any](x S, cmp func(a, b E) int) { n := len(x) pdqsortCmpFunc(x, 0, n, bits.Len(uint(n)), cmp) } // SortStableFunc sorts the slice x while keeping the original order of equal // elements, using cmp to compare elements in the same way as [SortFunc]. func SortStableFunc[S ~[]E, E any](x S, cmp func(a, b E) int) { stableCmpFunc(x, len(x), cmp) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 07 23:54:41 UTC 2024 - 5.8K bytes - Viewed (0) -
src/compress/gzip/gunzip.go
z := new(Reader) if err := z.Reset(r); err != nil { return nil, err } return z, nil } // Reset discards the [Reader] z's state and makes it equivalent to the // result of its original state from [NewReader], but reading from r instead. // This permits reusing a [Reader] rather than allocating a new one. func (z *Reader) Reset(r io.Reader) error { *z = Reader{ decompressor: z.decompressor,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 23:20:03 UTC 2023 - 8.5K bytes - Viewed (0) -
src/os/zero_copy_linux.go
// tryLimitedReader tries to assert the io.Reader to io.LimitedReader, it returns the io.LimitedReader, // the underlying io.Reader and the remaining amount of bytes if the assertion succeeds, // otherwise it just returns the original io.Reader and the theoretical unlimited remaining amount of bytes. func tryLimitedReader(r io.Reader) (*io.LimitedReader, io.Reader, int64) { var remain int64 = 1<<63 - 1 // by default, copy until EOF
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 4.6K bytes - Viewed (0) -
src/go/types/typeparam.go
} // compute type set if necessary if ityp.tset == nil { // pos is used for tracing output; start with the type parameter position. pos := t.obj.pos // use the (original or possibly instantiated) type bound position if we have one if n := asNamed(bound); n != nil { pos = n.obj.pos } computeInterfaceTypeSet(t.check, pos, ityp) } return ityp }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 20:03:31 UTC 2024 - 5.1K bytes - Viewed (0) -
src/go/types/instantiate_test.go
typ := pkg.Scope().Lookup("T").Type().(*Named) obj, _, _ := LookupFieldOrMethod(typ, false, pkg, "m") if obj == nil { t.Fatalf(`LookupFieldOrMethod(%s, "m") = %v, want func m`, typ, obj) } // Verify that the original method is not mutated by instantiating T (this // bug manifested when subst did not return a new signature). want := "func (T[P]).m()" if got := stripAnnotations(ObjectString(obj, RelativeTo(pkg))); got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 5.9K bytes - Viewed (0) -
src/net/http/fcgi/fcgi.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package fcgi implements the FastCGI protocol. // // See https://fast-cgi.github.io/ for an unofficial mirror of the // original documentation. // // Currently only the responder role is supported. package fcgi // This file defines the raw protocol and some utilities used by the child and // the host. import ( "bufio" "bytes"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 11 18:51:39 UTC 2023 - 5.9K bytes - Viewed (0) -
src/compress/lzw/writer_test.go
"../testdata/gettysburg.txt", "../testdata/e.txt", "../testdata/pi.txt", } // testFile tests that compressing and then decompressing the given file with // the given options yields equivalent bytes to the original file. func testFile(t *testing.T, fn string, order Order, litWidth int) { // Read the file, as golden output. golden, err := os.Open(fn) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 12 11:00:47 UTC 2021 - 5.7K bytes - Viewed (0) -
src/vendor/golang.org/x/crypto/sha3/sha3.go
// number of output bytes. It panics if any output has already been read. func (d *state) Sum(in []byte) []byte { if d.state != spongeAbsorbing { panic("sha3: Sum after Read") } // Make a copy of the original hash so that caller can keep writing // and summing. dup := d.clone() hash := make([]byte, dup.outputLen, 64) // explicit cap to allow stack allocation dup.Read(hash) return append(in, hash...)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 5.4K bytes - Viewed (0)