- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for receiver (0.18 sec)
-
doc/go1.17_spec.html
&*x // causes a run-time panic </pre> <h3 id="Receive_operator">Receive operator</h3> <p> For an operand <code>ch</code> of <a href="#Channel_types">channel type</a>, the value of the receive operation <code><-ch</code> is the value received from the channel <code>ch</code>. The channel direction must permit receive operations, and the type of the receive operation is the element type of the channel.
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) -
doc/go_spec.html
</pre> <h3 id="Receive_operator">Receive operator</h3> <p> For an operand <code>ch</code> whose <a href="#Core_types">core type</a> is a <a href="#Channel_types">channel</a>, the value of the receive operation <code><-ch</code> is the value received from the channel <code>ch</code>. The channel direction must permit receive operations, and the type of the receive operation is the element type of the channel.
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) -
src/builtin/builtin.go
// bidirectional or send-only. It should be executed only by the sender, // never the receiver, and has the effect of shutting down the channel after // the last sent value is received. After the last value has been received // from a closed channel c, any receive from c will succeed without // blocking, returning the zero value for the channel element. The form // // x, ok := <-c //
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/cmd/api/main_test.go
recv := sig.Recv().Type() // report exported methods with unexported receiver base type if true { base := recv if p, _ := recv.(*types.Pointer); p != nil { base = p.Elem() } if obj := base.(*types.Named).Obj(); !obj.Exported() { log.Fatalf("exported method with unexported receiver base type: %s", m) } } tps := "" if rtp := sig.RecvTypeParams(); rtp != nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Apr 09 20:48:51 GMT 2024 - 31.4K bytes - Viewed (0) -
src/archive/tar/common.go
// and an error is returned explaining why. // // As a by-product of checking the fields, this function returns paxHdrs, which // contain all fields that could not be directly encoded. // A value receiver ensures that this method does not mutate the source Header. func (h Header) allowedFormats() (format Format, paxHdrs map[string]string, err error) { format = FormatUSTAR | FormatPAX | FormatGNU paxHdrs = make(map[string]string)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Mar 15 16:01:50 GMT 2024 - 24.7K bytes - Viewed (2) -
misc/cgo/gmp/gmp.go
} // Abs sets z to the absolute value of x and returns z. func (z *Int) Abs(x *Int) *Int { x.doinit() z.doinit() C.mpz_abs(&z.i[0], &x.i[0]) return z } /* * functions without a clear receiver */ // CmpInt compares x and y. The result is // // -1 if x < y // 0 if x == y // +1 if x > y func CmpInt(x, y *Int) int { x.doinit() y.doinit()
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Apr 11 16:34:30 GMT 2022 - 9.5K bytes - Viewed (0) -
src/bytes/buffer_test.go
// Confirm that when Reader panics, the empty buffer remains empty var buf2 Buffer defer func() { recover() check(t, "TestReadFromPanicReader (2)", &buf2, "") }() buf2.ReadFrom(panicReader{panic: true}) } func TestReadFromNegativeReader(t *testing.T) { var b Buffer defer func() { switch err := recover().(type) { case nil: t.Fatal("bytes.Buffer.ReadFrom didn't panic") case error:
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/cmd/api/api_test.go
t.Fatalf("stdPackages contains unexpected package %s", pkg) } } } func TestIssue64958(t *testing.T) { defer func() { if x := recover(); x != nil { t.Errorf("expected no panic; recovered %v", x) } }() testenv.MustHaveGoBuild(t) for _, context := range contexts { w := NewWalker(context, "testdata/src/issue64958")
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jan 04 17:31:12 GMT 2024 - 7.1K bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback.go
} func testCallbackPanic(t *testing.T) { // Make sure panic during callback unwinds properly. if lockedOSThread() { t.Fatal("locked OS thread on entry to TestCallbackPanic") } defer func() { s := recover() if s == nil { t.Fatal("did not panic") } if s.(string) != "callback panic" { t.Fatal("wrong panic:", s) } if lockedOSThread() { t.Fatal("locked OS thread on exit from TestCallbackPanic")
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 111.5K bytes - Viewed (0) -
src/cmd/asm/internal/asm/operand_test.go
// parse is expected to call any parsing methods that may panic. // Returns error gathered from recover; nil if no parse errors occurred. // // For unexpected panics, calls t.Fatal. func tryParse(t *testing.T, parse func()) (err error) { panicOnError = true defer func() { panicOnError = false e := recover() var ok bool if err, ok = e.(error); e != nil && !ok { t.Fatal(e) } }() parse()
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 18:31:05 GMT 2023 - 23.9K bytes - Viewed (0)