[go-nuts] Re: VsCode syntax highlighting for tmpl files

2019-09-24 Thread cinematown
thnks, it's better than nothing On Tuesday, September 24, 2019 at 8:32:55 AM UTC+3, Subramanian Sridharan wrote: > > Nunjucks seems to do the trick. > > Nunjucks - Visual Studio Marketplace > > > ext install extension nunjuck

[go-nuts] Re: Any support for proxy certificates (RFC3820) ?

2019-09-24 Thread Christophe Meessen
Answering to my self. In case someone else is sharing the need, I found this Go package that provides support for x509 proxy certificates. https://gitlab.cern.ch/flutter/go-proxy Le lundi 23 septembre 2019 14:31:51 UTC+2, Christophe Meessen a écrit : > > Hello, > I need to write go code dealin

Re: [go-nuts] Clarification on unsafe conversion between string <-> []byte

2019-09-24 Thread francis
Keith, I think you've cracked it. It seems very simple in retrospect. Thanks. On Tuesday, September 24, 2019 at 1:40:02 AM UTC+2, Keith Randall wrote: > > In the runtime we use structs like these, but with unsafe.Pointer data > fields (runtime.stringStruct and runtime.slice). They are much safer

Re: [go-nuts] Clarification on unsafe conversion between string <-> []byte

2019-09-24 Thread francis
Robert Engels, I am not familiar with the two libraries you named. But from your description I think (I'm not sure) that we have different uses in mind. The escape analysis that would be required for us to avoid using unsafe is _possible_, but does not yet exist in the Go compiler. The compiler

[go-nuts] Re: go 1.13 won't compile

2019-09-24 Thread Robert Solomon
Sometimes I hate autocorrect I mean ~/go/src -- 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

Re: [go-nuts] Re: Getting Gobot package fails

2019-09-24 Thread Arie van Wingerden
Thx, that worx! Op zo 22 sep. 2019 om 23:41 schreef Amnon Baron Cohen : > try go get -u github.com/hybridgroup/gobot > > and change the import paths in your program. > > > On Sunday, 22 September 2019 16:14:48 UTC+1, Arie van Wingerden wrote: >> >> When I issue this command (as instructed on Gob

[go-nuts] Re: Need a Modules for Dummy's Guide. Please help

2019-09-24 Thread Stuart Davies
Wow - Brilliant - Thanks for taking the time to reply. I will need time to digest what you have said and get back to you with any further questions, and any insights I gain along the way. Regards Stuart On Monday, 23 September 2019 21:41:41 UTC+1, Stuart Davies wrote: > > Hi. > > > > I have

[go-nuts] Utility functions for package testing that read the source code

2019-09-24 Thread Robert Johnstone
I recently found the package github.com/matryer/is , and really liked its trick of loading the source code (found using runtime.Callers) so that the the messages for test failures could be created automatically. Enough that I experimented with my own pa

[go-nuts] Forking gotk3 not working?

2019-09-24 Thread erich . rast
Hi! This is perhaps more a question about git than Go but must have something to do with go get, too. I tried to fork gotk3 from github on the web page (using Fork button), because I need to merge some important 3rd party pull requests and the maintainer is no longer active. However, after crea

Re: [go-nuts] Forking gotk3 not working?

2019-09-24 Thread Dimas Prawira
Maybe this is not the answer for the problem, just want to share about do 'go get-ing' a private repo, first you should do a configuration Here is the reference : https://stackoverflow.com/questions/27500861/whats-the-proper-way-to-go-get-a-private-repository On Tue, Sep 24, 2019, 11:11 PM wrot

Re: [go-nuts] Re: Any support for proxy certificates (RFC3820) ?

2019-09-24 Thread Sebastien Binet
On Tue, Sep 24, 2019 at 10:40 AM Christophe Meessen < christophe.mees...@gmail.com> wrote: > Answering to my self. > > In case someone else is sharing the need, I found this Go package that > provides support for x509 proxy certificates. > https://gitlab.cern.ch/flutter/go-proxy > nice! -s --

Re: [go-nuts] nil map assignment panics. can we do better?

2019-09-24 Thread Marcin Romaszewicz
Could we have an operation like append() for slices? How about: m := insert(m, "key", "value"). It returns m unchanged if it's allocated, otherwise, it allocates. We're already familiar with this kind of function. -- Marcin On Mon, Sep 23, 2019 at 10:58 PM abuchanan via golang-nuts < golang-nu

Re: [go-nuts] nil map assignment panics. can we do better?

2019-09-24 Thread Jan Mercl
On Tue, Sep 24, 2019 at 10:11 PM Marcin Romaszewicz wrote: > > Could we have an operation like append() for slices? > > How about: > > m := insert(m, "key", "value"). A slice is a value but a map is implemented as a pointer. IOW, the line of code quoted above updates only the locally visible copy

[go-nuts] Cannot find libraries at go.pedge.io by Peter Edge

2019-09-24 Thread Craig Rodrigues
I have a package where the dependencies were vendored in a few years ago using govendor. I am trying to convert the vendor tree from govendor to go modules. I a having problems finding libraries written by Peter Edge, which had a DNS entry of go.pedge.io: "path": "go.pedge.io/env",

Re: [go-nuts] using Go as a configuration file format

2019-09-24 Thread Tyler Compton
I do think that turing complete configuration have their place in very limited circumstances. For example, I use a window manager called Awesome WM that is configured with Lua, and that allows me to implement my own features into the WM while configuring it. The significant disadvantage here is tha

[go-nuts] redirecting http to https

2019-09-24 Thread 'Julia Ma' via golang-nuts
Hi all, I recently realized that request.URL.Scheme is not the correct field to check whether a request is https or not (thank you to this thread and other posts on the inter

Re: [go-nuts] nil map assignment panics. can we do better?

2019-09-24 Thread Dan Kortschak
You can write that. func insert(m map[K]V, k K, v V) map[K]V { if m == nil { return map[K]V{k: v} } m[k] = v return m } On Tue, 2019-09-24 at 13:10 -0700, Marcin Romaszewicz wrote: > Could we have an operation like append() for slices? > > How abou

Re: [go-nuts] Clarification on unsafe conversion between string <-> []byte

2019-09-24 Thread khr
On Tuesday, September 24, 2019 at 2:44:46 AM UTC-7, fra...@adeven.com wrote: > > Robert Engels, I am not familiar with the two libraries you named. But > from your description I think (I'm not sure) that we have different uses in > mind. > > The escape analysis that would be required for us to

[go-nuts] Why not put contexts in structs?

2019-09-24 Thread johnmrusk
I've read the documentation recommended never to store a context in a struct. I'm curious to know why that's a bad thing. Is it just because context is request-scoped, and the struct may not be? Or is there more to it than that? In other words, what can go wrong if you store a context in a

[go-nuts] Why not put contexts in structs?

2019-09-24 Thread johnmrusk
I've read the documentation recommended never to store a context in a struct. I'm curious to know why that's a bad thing. Is it just because context is request-scoped, and the struct may not be? Or is there more to it than that? In other words, what can go wrong if you store a context in a

[go-nuts] Re: Forking gotk3 not working?

2019-09-24 Thread Sascha Andres
Hi, Are you working inside the GOPATH? Or are you trying to use it like a project that is go mod enabled? I ask because it sound it might try to use a proxy if you are on the latest go version. On Tuesday, September 24, 2019 at 6:11:53 PM UTC+2, eric...@gmail.com wrote: > > Hi! This is perhaps