Re: [go-nuts] error types/strings and errors.Is

2020-09-29 Thread 'Axel Wagner' via golang-nuts
On Tue, Sep 29, 2020 at 5:37 PM Kevin Chadwick wrote: > Is ENETUNREACH - "network is unreachable" typed anywhere? I assume string > matching on these is part of the Go 1 promise? > I hope not. If you want to handle a specific error, what you should do is file an issue to expose that error as a

Re: [go-nuts] error types/strings and errors.Is

2020-09-29 Thread Kevin Chadwick
On 2020-09-28 23:28, Ian Lance Taylor wrote: > I don't think there is any one solution that will be used in all > cases. Where the standard library can reasonably provide a shared > error type, it should, as it already does for types like os.PathError > and os.SyscallError. For a user package,

Re: [go-nuts] Re: syscall/js: JS Module Dynamic Imports?

2020-09-29 Thread Joop Kiefte
I think that's pretty recent? The only way used to be to add a script tag, and I have used that in Go before. I think just putting it in as a function call might work though... [Joop Kiefte - Chat @ Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=pengd) [pengd] On

[go-nuts] Re: syscall/js: JS Module Dynamic Imports?

2020-09-29 Thread Eduard Castany
I guess this works on node.js but I was referring to the browser environment. Where normal JavaScript can just `import("module")`. On Tuesday, 29 September 2020 at 11:44:56 UTC+2 Alvadron wrote: > This is what I have been doing and it has worked for my needs: > ``` > // Importing it using

[go-nuts] Re: http server unable to authorize other CA authorities on windows

2020-09-29 Thread smartaq...@gmail.com
Hello, The issue is resolved. Golang automatically search the CA's at appropriate path in case of unix flavored machines But, in case of os esp. windows I don't find any possibility or doc for guiding a

[go-nuts] Re: syscall/js: JS Module Dynamic Imports?

2020-09-29 Thread Alvadron
This is what I have been doing and it has worked for my needs: ``` // Importing it using "require" and storing the module in a variable core := js.Global().Call("require", "@boostercloud/framework-core") // Now get some props/methods from that module as usual: config :=

[go-nuts] syscall/js: JS Module Dynamic Imports?

2020-09-29 Thread Eduard Castany
In JavaScript we can import JavaScript modules statically and dynamically. How could we import a JavaScript module dynamically in Go? The closest/simplest thing may be to add an HTML script tag into the page

[go-nuts] protobuf avoid namespace conflict

2020-09-29 Thread Vasiliy Tolstov
Hi! I have two packages server and client. All belongs to different repos. In this packages i have internal/errors dir with errors.proto file Both of them contains go_package option and package unique option go_package = "xxx.org/server/internal/errors"; package server.errors; option go_package