[go-nuts] When doing "type X Y", is it a type alias or type redefinition or type adapter or something else?

2019-08-12 Thread Sathish VJ
And what is the difference between each of these: type alias, type redefinition, type adapter. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] [gccgo] weird constant values in sysinfo.go

2019-08-12 Thread Xiangdong JI
Hello, The .go files generated during building gccgo seem to have a few constants with weird values, for example: // sysinfo.go (on x86-64, latest gcc-9 trunk) const ___FLT128_MAX__ = 1.1 const ___FLT32X_DENORM_MIN__ = 1.1 as a comparison, gollvm generates expected values. Could it be caused

[go-nuts] how cgo handle user define signal ? need go pass the signal handle to c

2019-08-12 Thread hui zhang
I am trying to extend a old c program with go.Add websocket ability to this c program. first build go as a .so dynamic lib then link the so lib in c program I run the cgo ok in an example program. But when integrate with old c program, c program will send a signal 42 to itself periodly.

Re: [go-nuts] JSON Marshal for config file url encoding string.

2019-08-12 Thread Rich
Thanks!! Totally missed that one. Switched to from json.Marshal to json.Encode: jsonEnc:=json.NewEncoder(file) jsonEnc.SetIndent("", tab) jsonEnc.SetEscapeHTML(false) Works great!! On Monday, August 12, 2019 at 2:18:02 PM UTC-4, Jesper Louis Andersen wrote:

Re: [go-nuts] JSON Marshal for config file url encoding string.

2019-08-12 Thread Jesper Louis Andersen
Documented here: https://golang.org/pkg/encoding/json/#Marshal There is also a description of how to avoid it. On Mon, Aug 12, 2019 at 7:39 PM Rich wrote: > Hi I have an application that I wrote that uses JSON for the config file. > The application is a chatbot I use internally and allows

[go-nuts] JSON Marshal for config file url encoding string.

2019-08-12 Thread Rich
Hi I have an application that I wrote that uses JSON for the config file. The application is a chatbot I use internally and allows users to run linux commands to get information both locally and via ssh. The chatbot interface uses basic html to render the output so 90% of the time I want to

[go-nuts] How to auto generate function code hidden .go files for static library built by -buildmode=archive?

2019-08-12 Thread nifflerfox
When I publish a Go package which need to hide important code > go build -buildmode=archive -o ***.a I use this command to make .a static library, when other users need to use this .a static library, they need this .a and .go files which have all needed public functions, structs and

Re: [go-nuts] I know you cannot kill a goroutine, but ...

2019-08-12 Thread 'Jim Idle' via golang-nuts
Good luck on your implementation. I suggest though that you will find too many issues like this to use go routines as the base model for a user. I looked in to threads as a model for jBASE and even with that model, it was going to be too fraught with difficulty. Unless you are considering a

[go-nuts] Any tool can auto generate fake go files with type definition for binary-only-package?

2019-08-12 Thread nifflerfox
I don't want to write type definition for fake go files, but type definition is necessary for binary-only-package end users, like code hint. If the package has a lot of functions/structs, write type definition is an impossible hard work. -- You received this message because you are subscribed

Re: [go-nuts] Wrapper package for dialog (and Xdialog)?

2019-08-12 Thread Wojciech S. Czarnecki
On Sun, 11 Aug 2019 06:17:53 -0700 (PDT) Tong Sun wrote: > I know there are several ncurses based wrapper packages (like goncurses), > but are there any wrapper packages out there dialog (and Xdialog), or > something similar? The goncurses is still too low-level for my > simple dialog-base

[go-nuts] Re: How to propagate multiple errors using the new fmt.Errorf wrapping

2019-08-12 Thread anderson . queiroz
Hi Alex, I see your problem is more like merging errors rather than wrapping them. Indeed I don't see any way you could merge 2 errors with the new ` *fmt.Errorf*` I believe what you want is something which could hold 2 errors, like type myError struct { msg string // some additional msg