Re: [go-nuts] how to understand a reflect.ValueOf is addressable ?

2019-06-25 Thread Ian Lance Taylor
On Tue, Jun 25, 2019 at 5:57 PM Hyvi wrote: > > x := 2 > a := reflect.ValueOf(x) //no variable This is the value of the constant 2, which is not addressable. > b := reflect.ValueOf() //no variable This is the value of a pointer, which need not be addressable. For example, given a

[go-nuts] how to understand a reflect.ValueOf is addressable ?

2019-06-25 Thread Hyvi
x := 2 a := reflect.ValueOf(x) //no variable b := reflect.ValueOf() //no variable c := reflect.ValueOf().Elem() //yes variable WHY c is addressable? but a and b not -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

Re: [go-nuts] [ANN] Simple DNS Server implemented in Go

2019-06-25 Thread Matt Harden
I realize this is a learning exercise for you, but in case you're interested, the DNS message types are implemented for you in https://godoc.org/golang.org/x/net/dns/dnsmessage. On Tue, Jun 25, 2019 at 1:36 PM Eric S. Raymond wrote: > Daniel Lorch : > > I have implemented a simple authoritative

[go-nuts] golang.org IP addresses.

2019-06-25 Thread taigrrr8 via golang-nuts
Hi, We have systems that we restrict from access the outside but want to give them access to sites like golang.org. Does anyone have a list of IPs or CIDRs for golang.org? Thx. T -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] [ANN] Simple DNS Server implemented in Go

2019-06-25 Thread Eric S. Raymond
Daniel Lorch : > I have implemented a simple authoritative DNS Server in Go. You can find it > here: https://github.com/dlorch/dnsserver/ > > It's a study project to teach myself Go and DNS. Haven't looked at it yet, but I must say I think you just nailed one of the ideal use cases for Go.

[go-nuts] [ANN] Simple DNS Server implemented in Go

2019-06-25 Thread Daniel Lorch
Hi all I have implemented a simple authoritative DNS Server in Go. You can find it here: https://github.com/dlorch/dnsserver/ It's a study project to teach myself Go and DNS. Usage as follows: $ go run dnsserver.go & Listening at: :1053 $ dig example.com @localhost -p 1053 Received request

Re: [go-nuts] Curious why GOBIN can not be set for cross compiling?

2019-06-25 Thread Ian Lance Taylor
On Tue, Jun 25, 2019 at 11:36 AM Andrew O'Neill wrote: > > I attempted to run the following command from a mac laptop (GOOS=darwin) > > GOBIN=/path/to/my/dir GOOS=linux go install > github.com/golang/protobuf/protoc-gen-go > > I get an error that go cannot install cross-compiled binaries when

Re: [go-nuts] [cgo ] Export go function to C - illegal character

2019-06-25 Thread nicolas_boiteux via golang-nuts
If you want to test, you can retrieve the content of this git : https://github.com/code34/armago_x64/tree/32bits build the 32 bits dll in the same directory with the name : armago.dll after this you only have to called : callextension.exe ./test_script.sqf if the dll doesn't works as expected

[go-nuts] Curious why GOBIN can not be set for cross compiling?

2019-06-25 Thread Andrew O'Neill
I attempted to run the following command from a mac laptop (GOOS=darwin) GOBIN=/path/to/my/dir GOOS=linux go install github.com/golang/protobuf/protoc-gen-go I get an error that go cannot install cross-compiled binaries when GOBIN is set. Is there a technical limitation or is it just not

Re: [go-nuts] How to build gollvm on arm platform

2019-06-25 Thread Ian Lance Taylor
On Tue, Jun 25, 2019 at 8:41 AM eric fang wrote: >> >> >>I'll write down a more specific list of tips and pointers to the code >> >>later today; stay tuned. > > > Hi Than, I'm also very interested in this work and look forward to your > update. > > I'm reading the gollvm code, but I haven't

Re: [go-nuts] [cgo ] Export go function to C - illegal character

2019-06-25 Thread nicolas_boiteux via golang-nuts
Conflicting declaration for RVExtension declaration :( and the -ldflags doesn't shown the same parameters. Le mardi 25 juin 2019 13:27:14 UTC+2, Alexander Kapshuk a écrit : > > Tried that. Still no luck. Hm. > > I'm not sure how you've been building your DLL, but if you're > including the

Re: [go-nuts] In module mode, where does "go install" install executables

2019-06-25 Thread Andy Balholm
Yes, it looks like that is right. Andy > On Jun 25, 2019, at 9:25 AM, Wagner Riffel wrote: > > I'd bet the default GOPATH, that is $HOME/go > BR. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] In module mode, where does "go install" install executables

2019-06-25 Thread Wagner Riffel
> > I'd bet the default GOPATH, that is $HOME/go BR. -- 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+unsubscr...@googlegroups.com. To view this

[go-nuts] In module mode, where does "go install" install executables

2019-06-25 Thread Andy Balholm
When GOPATH is set, “go install” installs executables to $GOPATH/bin (assuming there is just one path in GOPATH). When GOPATH is not set, where do the executables go? I haven’t been able to find them. Andy -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] How to build gollvm on arm platform

2019-06-25 Thread eric fang
> > >>I'll write down a more specific list of tips and pointers to the code > later today; stay tuned. > Hi Than, I'm also very interested in this work and look forward to your update. I'm reading the gollvm code, but I haven't figured out the relationship between the various modules

Fwd: [go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-06-25 Thread Liam Breck
Microsoft recommends changing this, so we need to know whether existing apps rely on it: On Windows (but not elsewhere) this fails with a "sharing violation": path := "rename-after-open" fd, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600) if err != nil { ... } err = os.Rename(path_a,

Re: [go-nuts] [cgo ] Export go function to C - illegal character

2019-06-25 Thread Alexander Kapshuk
Tried that. Still no luck. Hm. I'm not sure how you've been building your DLL, but if you're including the _cgo_export.h in your .c file which is then compiled/linked into a DLL, perhaps you could manually try changing this line: extern void RVExtension(char* p0, size_t p1, char* p2); into what

Re: [go-nuts] [cgo ] Export go function to C - illegal character

2019-06-25 Thread Alexander Kapshuk
Wander if specifying those linker flags via the '-ldflags' command line option would make a difference: go help build: -ldflags '[pattern=]arg list' arguments to pass on each go tool link invocation. On Tue, Jun 25, 2019 at 9:16 AM nicolas_boiteux via golang-nuts wrote: > > it

Re: [go-nuts] sudo ./main command throwing error

2019-06-25 Thread Kurtis Rader
That means your "sudo" configuration doesn't allow the use of the `-E` flag; at least in that specific use case. Alternatively, your system doesn't preserve the value of `LD_LIBRARY_PATH` when the shell is invoked via `sudo -E` because the shell's startup scripts clobber that var. I hope you

Re: [go-nuts] [cgo ] Export go function to C - illegal character

2019-06-25 Thread nicolas_boiteux via golang-nuts
it tried to also allow those flags by setting the env variablee ldflag allow but it seems to have no effect. Le lundi 24 juin 2019 21:15:34 UTC+2, nobody nobodye a écrit : > > it seems that flags --no-undefined --enable-runtime-pseudo-reloc are > invalid flags :( > > /* > #cgo LDFLAGS:

Re: [go-nuts] Go serial port package

2019-06-25 Thread maranatha
I have been trying to use both Tarmigan's and Jacob's packages on Windows and Linux. For basic serial reading they both seem to work just fine. However, they both seem to break with higher baud rate and continues streaming of data. In my case I was streaming sensor data at baud rate 921600,

Re: [go-nuts] sudo ./main command throwing error

2019-06-25 Thread Nitish Saboo
HI Michael, Looks like it is still not preserving the env variable: nsaboo@ubuntu:~/Documents/goworkspace/src/poc$ export LD_LIBRARY_PATH=/usr/local/lib/syslog-ng nsaboo@ubuntu:~/Documents/goworkspace/src/poc$ sudo -E bash -c 'echo $LD_LIBRARY_PATH'