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

2019-06-25 Thread Olu Peter
Cool stuff. I’ll check it out and revert -- 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 discussion on the

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(&x) //no variable This is the value of a pointer, which need not be addressable. For example, given a map[int]*b

[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(&x) //no variable c := reflect.ValueOf(&x).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 gr

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 unsubscri

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. Prov

[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 f

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 GOB

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 i

[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 implem

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 fig

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 _cgo

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 receivin

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 discu

[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 "golang-n

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 (llvm,

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, path_b

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 i

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 trie