So doing *type X Y* is just a type declaration then?
Meanwhile, I wrote a small example to help me figure out the differences
between some of these based on the specs. Leaving it here in case it is
useful for somebody.
package main
import "fmt"
type X struct {}
func (X) f() {}
type Y X // c
type X Y declares a named type X with underlying type Y.
A type alias is something completely different (look up
"Alias declaration" in the Spec).
There are no such things like "type redefinition" or
"type adapter" in Go. See the Spec again: It contains
neither. So the main difference between a ty
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 golang-nuts+unsubs
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 b
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.
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:
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 users
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 have
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 constant
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
product
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
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 req
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
13 matches
Mail list logo