- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for Equals (0.16 sec)
-
doc/go1.17_spec.html
</li> <li> Struct values are comparable if all their fields are comparable. Two struct values are equal if their corresponding non-<a href="#Blank_identifier">blank</a> fields are equal. </li> <li> Array values are comparable if values of the array element type are comparable. Two array values are equal if their corresponding elements are equal. </li> </ul> <p>
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
src/bytes/buffer_test.go
if allocs != 0 { t.Errorf("allocation occurred during write") } // Check that buffer has correct data. if !Equal(buf.Bytes()[0:startLen-readBytes], xBytes[readBytes:]) { t.Errorf("bad initial data at %d %d", startLen, growLen) } if !Equal(buf.Bytes()[startLen-readBytes:startLen-readBytes+growLen], yBytes) { t.Errorf("bad written data at %d %d", startLen, growLen) } } } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
src/archive/zip/reader_test.go
}(j, ft) n++ } } for ; n > 0; n-- { <-done } } func equalTimeAndZone(t1, t2 time.Time) bool { name1, offset1 := t1.Zone() name2, offset2 := t2.Zone() return t1.Equal(t2) && name1 == name2 && offset1 == offset2 } func readTestFile(t *testing.T, zt ZipTest, ft ZipTestFile, f *File, raw []byte) { if f.Name != ft.Name { t.Errorf("name=%q, want %q", f.Name, ft.Name) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0) -
src/bytes/example_test.go
// a less b } if bytes.Compare(a, b) <= 0 { // a less or equal b } if bytes.Compare(a, b) > 0 { // a greater b } if bytes.Compare(a, b) >= 0 { // a greater or equal b } // Prefer Equal to Compare for equality comparisons. if bytes.Equal(a, b) { // a equal b } if !bytes.Equal(a, b) { // a not equal b } } func ExampleCompare_search() {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
doc/go_spec.html
<p> Comparison operators compare two operands and yield an untyped boolean value. </p> <pre class="grammar"> == equal != not equal < less <= less or equal > greater >= greater or equal </pre> <p> In any comparison, the first operand must be <a href="#Assignability">assignable</a> to the type of the second operand, or vice versa.
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu May 02 22:43:51 GMT 2024 - 279.6K bytes - Viewed (0) -
doc/next/6-stdlib/2-unique.md
Any value of comparable type may be canonicalized with the new `Make[T]` function, which produces a reference to a canonical copy of the value in the form of a `Handle[T]`. Two `Handle[T]` are equal if and only if the values used to produce the handles are equal, allowing programs to deduplicate values and reduce their memory footprint. Comparing two `Handle[T]` values is efficient, reducing down to a simple
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Wed Apr 24 13:37:36 GMT 2024 - 579 bytes - Viewed (0) -
src/archive/zip/zip_test.go
} } } func TestModTime(t *testing.T) { var testTime = time.Date(2009, time.November, 10, 23, 45, 58, 0, time.UTC) fh := new(FileHeader) fh.SetModTime(testTime) outTime := fh.ModTime() if !outTime.Equal(testTime) { t.Errorf("times don't match: got %s, want %s", outTime, testTime) } } func testHeaderRoundTrip(fh *FileHeader, wantUncompressedSize uint32, wantUncompressedSize64 uint64, t *testing.T) {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
src/builtin/builtin.go
// argument, not a pointer to it. The specification of the result depends on // the type: // // Slice: The size specifies the length. The capacity of the slice is // equal to its length. A second integer argument may be provided to // specify a different capacity; it must be no smaller than the // length. For example, make([]int, 0, 10) allocates an underlying array
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 12.7K bytes - Viewed (0) -
src/archive/tar/tar_test.go
t.Errorf("Mode = %#o; want %#o", g, e) } if g, e := h.Size, int64(5); g != e { t.Errorf("Size = %v; want %v", g, e) } if g, e := h.ModTime, fi.ModTime(); !g.Equal(e) { t.Errorf("ModTime = %v; want %v", g, e) } // FileInfoHeader should error when passing nil FileInfo if _, err := FileInfoHeader(nil, ""); err == nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 24K bytes - Viewed (0) -
src/archive/tar/reader.go
return nil, nil, err // EOF is okay here; exactly 0 bytes read } if bytes.Equal(tr.blk[:], zeroBlock[:]) { if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil { return nil, nil, err // EOF is okay here; exactly 1 block of zeros read } if bytes.Equal(tr.blk[:], zeroBlock[:]) { return nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0)