Re: [go-nuts] Re: js.ValueOf for an error

2022-12-23 Thread Will Hawkins
T", readErr) as the > code, and readErr.Error() as the value? At least those are both strings. > > https://go.dev/play/p/nd1FXUvD_zg > > On Friday, 23 December 2022 at 14:33:21 UTC Will Hawkins wrote: >> >> Hello everyone! >> >> First, thank you *all* (I me

[go-nuts] js.ValueOf for an error

2022-12-23 Thread Will Hawkins
Hello everyone! First, thank you *all* (I mean this great community) for the Go language and especially its support for a wasm target. As I was attempting to finish up a CL (https://go-review.googlesource.com/c/go/+/458395) I found occasion to need to great a JS Error based on a Go error. I w

Re: [go-nuts] Re: %T, type assertions and the Go spec

2017-06-20 Thread Will Hawkins
On Jun 20, 2017 3:40 PM, "Ian Lance Taylor" wrote: On Mon, Jun 19, 2017 at 11:30 PM, Will Hawkins wrote: > > On Tuesday, June 20, 2017 at 2:19:25 AM UTC-4, Volker Dobler wrote: >> >> On Tuesday, 20 June 2017 06:52:58 UTC+2, Will Hawkins wrote: >>> >>

[go-nuts] Re: %T, type assertions and the Go spec

2017-06-19 Thread Will Hawkins
On Tuesday, June 20, 2017 at 2:19:25 AM UTC-4, Volker Dobler wrote: > > On Tuesday, 20 June 2017 06:52:58 UTC+2, Will Hawkins wrote: >> >> I know that there is a difference between interface values and dynamic >> types and dynamic values. Is it possible that the docume

[go-nuts] Re: %T, type assertions and the Go spec

2017-06-19 Thread Will Hawkins
Thank you very much for your response! I definitely understand what you are getting at, but I don't think that it's technically correct. For instance, https://golang.org/ref/spec#Interface_types seems to pretty clearly say that an interface is a type. Moreover, there is the possibility of "t

[go-nuts] Re: %T, type assertions and the Go spec

2017-06-19 Thread Will Hawkins
Sorry to reply to myself, but I gave this some additional thought and wanted to add a few comments. Please see below! Thanks again! On Tuesday, June 20, 2017 at 12:52:58 AM UTC-4, Will Hawkins wrote: > > Hello great go community! > > I'm really struggling with something and

[go-nuts] %T, type assertions and the Go spec

2017-06-19 Thread Will Hawkins
Hello great go community! I'm really struggling with something and I was hoping that you all could provide some help. I am sure that I am missing something obvious, but I can't get my head around it. In the Go spec, I see this statement: "If the type assertion holds, the value of the expressio

Re: [go-nuts] Dereferencing pointers, function evaluation and tuple assignment

2017-06-01 Thread Will Hawkins
On Fri, Jun 2, 2017 at 1:03 AM, Ian Lance Taylor wrote: > On Thu, Jun 1, 2017 at 9:52 PM, Will Hawkins wrote: >> On Fri, Jun 2, 2017 at 12:41 AM, Ian Lance Taylor wrote: >>> >>> Unlike function calls, the language spec doesn't anything about when a >>> d

Re: [go-nuts] Dereferencing pointers, function evaluation and tuple assignment

2017-06-01 Thread Will Hawkins
On Fri, Jun 2, 2017 at 12:41 AM, Ian Lance Taylor wrote: > On Thu, Jun 1, 2017 at 6:40 PM, Will Hawkins wrote: >> Hello awesome community! >> >> I am so honored to be a part of the great community of gophers around the >> world. Thank you to everyone who makes it

[go-nuts] Dereferencing pointers, function evaluation and tuple assignment

2017-06-01 Thread Will Hawkins
Hello awesome community! I am so honored to be a part of the great community of gophers around the world. Thank you to everyone who makes it so inviting to everyone who wants to participate. I am writing today to ask about some puzzling behavior with respect to dereferencing pointers, functio