[go-nuts] Can I see all output of `go test` in VIM when i use vim-go plugin?

2016-09-09 Thread Luke
Hi, I am trying to figure out how to see the whole output of command `go test` (:GoTest) in VIM... I use vim-go. Right now, it just says if it was a failure or success, however I also print out some logs using t.Logf and this output is not being shown anywhere... thx -- You received this mes

Re: [go-nuts] Can I see all output of `go test` in VIM when i use vim-go plugin?

2016-09-14 Thread Luke
:!go test works great... thank you On Wednesday, September 14, 2016 at 8:41:15 AM UTC-4, Jan Mercl wrote: > > On Fri, Sep 9, 2016 at 5:43 PM Luke > > wrote: > > > I am trying to figure out how to see the whole output of command `go > test` (:GoTest) in VIM... I use vi

[go-nuts] unmarshaling json to byte type

2016-09-14 Thread Luke
Hi, i have something like: https://play.golang.org/p/j5WhDMUTI- type A struct { Name string `json:"n"` Typ byte `json:"t"` } JSON string: j := `{"n":"test", "t":"x"}` When I try to do a := A{} json.Unmarshal([]byte(j), &a) I get error like: *json: cannot unmarshal string into

[go-nuts] Re: IDE for GOLANG

2016-08-08 Thread luke
http://goclipse.github.io/ kritika...@indiamart.com於 2016年8月2日星期二 UTC+8下午8時25分21秒寫道: > > Hi, > is there IDE for creating a web service in GOLANG by using Revel framework > which follows MVC architecture. > > i am using Ubuntu .. > > > > *Watch our latest TV Commercial #IndiaKiKhoj >

[go-nuts] Windows cgo complier

2018-03-28 Thread Luke Mauldin
and I want to verify I am using the validated windows tool chain. Luke -- 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...@google

[go-nuts] Why does unmarshalling this API response return an unexpected EOF?

2018-05-13 Thread ivanchenko . luke
Hi all, I'm creating a microservice in Go, using protocol buffers and gRPC. It interacts with a third-party API (Snooth) and I'm trying to unmarshal the JSON response into a protobuf struct I've created, using the proto package. Unmarshalling returns an unexpected EOF error. I've summed up th

[go-nuts] Re: Why does unmarshalling this API response return an unexpected EOF?

2018-05-14 Thread Luke IC
IQzMm2tDI7w > > The protoc-generated code's Unmarshal parses a *Protocol Buffers* encoded > byte stream, NOT JSON! > > > 2018. május 14., hétfő 5:24:06 UTC+2 időpontban Luke IC a következőt írta: >> >> Hi all, >> >> I'm creating a microservice in Go

[go-nuts] Re: Why does unmarshalling this API response return an unexpected EOF?

2018-05-14 Thread Luke IC
his fine to do, or is it super inefficient and will cause problems? On Tuesday, 15 May 2018 05:09:04 UTC+10, alex@gmail.com wrote: > > You need to use the go protobuf json decoder > https://github.com/golang/protobuf/tree/master/jsonpb > > On Monday, 14 May 2018 11:24:06 UTC+8

[go-nuts] Re: Why does unmarshalling this API response return an unexpected EOF?

2018-05-14 Thread Luke IC
Also use this as a reference on what gets mapped to what > https://developers.google.com/protocol-buffers/docs/proto3#json > > On Tuesday, 15 May 2018 05:03:46 UTC+8, Luke IC wrote: >> >> Thanks a lot, I went back and gave jsonpb a go and finally got it >> unmarshalling as

[go-nuts] Re: Why does unmarshalling this API response return an unexpected EOF?

2018-05-14 Thread Luke IC
do not see escaped quotes on your stackoverflow post, can you post the > raw json exactly as received? > > On Tuesday, 15 May 2018 05:16:59 UTC+8, Luke IC wrote: >> >> Thanks again for the help. Unfortunately it's a third-party API, so I >> won't be able to fix

[go-nuts] Re: Why does unmarshalling this API response return an unexpected EOF?

2018-05-15 Thread Luke IC
Cool, thanks. I've created a new issue on the `jsonpb` repo as well. On Tuesday, 15 May 2018 15:07:44 UTC+10, Tamás Gulácsi wrote: > > > 2018. május 14., hétfő 23:03:46 UTC+2 időpontban Luke IC a következőt írta: >> >> Thanks a lot, I went back and gave json

[go-nuts] Build with C dependencies

2019-01-22 Thread Luke Mauldin
I have a Go program that I need to link against multiple C libraries in order to compile. I am setting the CFLAGS and LDFLAGS through #cgo directives which works nicely. My problem is that I would like to run my go builds (and test, etc...) inside a docker container so I can put the C include

[go-nuts] Cgo Pointer Arithmetic

2016-08-31 Thread Luke Mauldin
I have questions about pointer arithmetic illustrated by this Play example: https://play.golang.org/p/-cZteTY_M2 Questions: 1) Is this the best way to do pointer arithmetic in Go to process a C array and convert it to a Go slice? 2) Go vet gives an error on line 18 but doesn't give much informa

Re: [go-nuts] Cgo Pointer Arithmetic

2016-08-31 Thread Luke Mauldin
entries? If so, how great is that penalty? On Wednesday, August 31, 2016 at 3:17:30 PM UTC-5, Ian Lance Taylor wrote: > On Wed, Aug 31, 2016 at 12:47 PM, Luke Mauldin > wrote: > > > > I have questions about pointer arithmetic illustrated by this Play > example: > >

Re: [go-nuts] Cgo Pointer Arithmetic

2016-09-01 Thread Luke Mauldin
tions into memory safe Go slices that will then be used throughout the Go program. On Wednesday, August 31, 2016 at 5:26:27 PM UTC-5, Ian Lance Taylor wrote: > On Wed, Aug 31, 2016 at 2:06 PM, Luke Mauldin > wrote: > > I modified my example based on the code example you gave

[go-nuts] Go string to uintptr

2016-09-06 Thread Luke Mauldin
I am on Windows and I am using the syscall package to call C functions exposed in windows dlls. I am trying to call a C function that accepts a "const char*" parameter. How do I convert a Go string to a uintptr that I can use in (p *LazyProc) Call(...)? I have tried several different approac

Re: [go-nuts] Go string to uintptr

2016-09-07 Thread Luke Mauldin
Thank you for the help, that worked. I don't want to use cgo directly because of the compile overhead and because cgo prevents debugging on Windows. Another question, if there is a C function with the declaration: void returnOutCString(char ** out) I can call the function using: var retPtr uns

[go-nuts] C Syscall Memory Code Review

2016-09-12 Thread Luke Mauldin
option but it isn't a good fit for my environment. Luke -- 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

[go-nuts] Win 32bit calling convention

2016-09-27 Thread Luke Mauldin
I am using the steps as detailed at the bottom of this issue https://github.com/golang/go/issues/11058 to create a Go shared library on Windows exposing C function. Right now it is all working compiling in X64. If I also want to make an X32 version of my library, I know I will have to set som

[go-nuts] Go Windows vs Linux networking stack differences

2017-02-22 Thread Luke Mauldin
("tcp", ":8080), etc.. but I would like to know if there are underlying network stack differences in the Go standard library that will cause different performance characteristics between the two OSes? Luke Mauldin -- You received this message because you are subscribed to th

[go-nuts] Re: httputil.ReverseProxy + http.DefaultTransport.DialContext results in cancelled DNS requests

2017-06-28 Thread luke . kysow
Seeing this issue with golang 1.8.3 in Kubernetes but without a reverse proxy. Just KubeDNS -> Kubernetes service IP -> other Golang service. When compiled with go 1.7 we saw "dial tcp: no suitable address found" errors and so after looking at this issue

[go-nuts] Many instances question - shared library

2020-02-28 Thread Luke Mauldin
se case. Any other recommendations? Luke -- 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 disc

[go-nuts] Re: Many instances question - shared library

2020-02-28 Thread Luke Mauldin
The multiple instances are required to due to way the 3rd party application works. In brief, it creates a new process for each user connection and then each new process dynamically load the Go shared library to provide C extension points. -- You received this message because you are subscribed

[go-nuts] Re: Many instances question - shared library

2020-02-28 Thread Luke Mauldin
I agree that it is not a scalable architecture but unfortunately it is a large third party application the business depends on and it cannot be rewritten. Option 3 to use grpc is a good idea but unfortunately won’t work either because the Go shared library invokes C function calls back into the

[go-nuts] gopls performance question

2020-07-03 Thread Luke Mauldin
the `gopls` Github project. Luke -- 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

[go-nuts] Re: gopls performance question

2020-07-03 Thread Luke Mauldin
seconds in VSCode. I am using VSCode 1.46.1 on Linux. Could this in some way be a VSCode issue instead of gopls? On Friday, July 3, 2020 at 3:43:53 PM UTC-4, Luke Mauldin wrote: > > I have a Go project that is relatively small in terms of number of files > (less than 30) but some Go files

[go-nuts] Re: gopls performance question

2020-07-08 Thread Luke Mauldin
To follow up, I did submit an issue and it is related to a bug in gopls: https://github.com/golang/vscode-go/issues/299 -- 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 ema

[go-nuts] Hacking gc to support methods on builtin types

2021-02-07 Thread Luke Champine
Hi all, Recently, I managed to get this to work: x := []int{1, 2, 3} x.reverse() fmt.Println(x) That is, when I run my modified compiler on this code, it prints [3, 2, 1]. Neat! To be clear, I am *not* intending to get this merged upstream -- this is just a fun exercise to learn m

[go-nuts] Re: Hacking gc to support methods on builtin types

2021-02-07 Thread Luke Champine
Yep, in fact I have already added min and max functions that return the lesser/greater of their two arguments. Adding builtin functions is much easier than builtin methods, since other builtin functions are already supported by the compiler. You just add a new op type to gc/syntax.go, then add

[go-nuts] Re: Code style in golang compiler

2021-02-08 Thread Luke Champine
git blame is instructive here. The commit in question is: https://github.com/golang/go/commit/166b1219b8a5b246c83986c7ecef3d15c85c8150 I can't claim to fully understand the commit message, but I believe that this change will cause the runtime to allocate both values together, rather than separa

[go-nuts] `for i, v := range` causes allocation

2021-04-12 Thread Luke Wilson
r loops that do not write to the iterated variable. Sorry for the rant, I'm passionate about it. Luke -- 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, sen

Re: [go-nuts] `for i, v := range` causes allocation

2021-04-12 Thread Luke Wilson
On 4/12/21 11:31 AM, Jan Mercl wrote: I believe no silent allocation and no conversion to a slice of runes occurs. A single instance of variable c, of type rune, exists within the loop. There's no problem with modifying 'c'. A problem exists if the _address_ of 'c' is assumed to point to differen

[go-nuts] Golang subversion vcs

2021-12-06 Thread Luke Mauldin
I see the latest (Go 1.17.X) releases support Subversion modules but I cannot figure out how to get the `go get` command to pull in a tagged subversion module. Subversion repo layout - tags - contracts - configcontracts - v2.8.1 - trunk - contracts - configcontracts - g

Re: [go-nuts] Error handling

2023-08-01 Thread 'Luke Crook' via golang-nuts
And of course I forgot the "if" at the beginning of all those conditional. *sigh* -- 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...@googlegr

Re: [go-nuts] Error handling

2023-08-01 Thread 'Luke Crook' via golang-nuts
On Tue, Aug 1, 2023 at 10:18 AM DrGo wrote: > >> What happens if all of a sudden, the makeSomeNoise returns 2 errors? Then > you have to undo the orelse construction, for what I understand. > No as long as both errors are meant to be handled as errors. Orelse will > be triggered if any or both we

Re: [go-nuts] Re: Best IDE for GO ?

2023-08-21 Thread 'Luke Crook' via golang-nuts
Yes, the second half sounded like a request for software life cycle tooling to be integrated into the IDE; https://en.wikipedia.org/wiki/Application_lifecycle_management On Sun, Aug 20, 2023 at 12:56 AM Christoph Berger < christoph.g.ber...@gmail.com> wrote: > > *> What I'm looking for is the a

Re: [go-nuts] Re: Is it expected that signal.NotifyContext() changes the execution thread?

2023-10-02 Thread &#x27;Luke Crook' via golang-nuts
It's a thing. In https://www.libsdl.org/ all rendering calls have to be performed in the main thread. And I believe in Windows, the event loop has to run in the same thread that created the window. /Luke On Mon, Oct 2, 2023 at 10:08 PM Kurtis Rader wrote: > Thank you to Ian and The

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-11-03 Thread &#x27;Luke Crook' via golang-nuts
For Windows, could you package and distribute the prebuilt binaries using an MSI file? (https://nsis.sourceforge.io/Main_Page) On Fri, Nov 3, 2023 at 12:10 PM Robert Engels wrote: > Better to rewrite the native portions in Go. > > If you’re not going to do that, just give instructions on how t