Re: [go-nuts] Resources to learn Go as a first programming language?

2018-02-15 Thread Jon Calhoun
You can also check out Caleb Doxseys free ebook - https://www.golang-book.com/books/intro -- 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...

[go-nuts] Re: Go += Package Versioning

2018-02-20 Thread Jon Calhoun
Would you be willing to create an example illustrating how a versioned package should look with major version changes? You have great examples for the minor/patch changes, but I don't see any concrete examples for a major version bump. On Tuesday, February 20, 2018 at 12:20:54 PM UTC-5, Russ Co

Re: [go-nuts] Go += Package Versioning

2018-02-23 Thread Jon Calhoun
Not ideal, but you *could* release a new major version where the "breaking" change is the import path change. Eg if you are on v3 now, make a v4 folder and the upgrade to v4 process would involve updating import paths. I wouldn't do this right away since vgo is just a prototype and could change to

[go-nuts] Re: Who are the https://gophers.slack.com/ admins?

2017-11-13 Thread Jon Calhoun
I believe the people over at https://golangbridge.org/ are responsible for the Slack as well, so I would contact them. On Monday, November 13, 2017 at 1:41:13 PM UTC-5, Vlad Didenko wrote: > > My phone got stolen, so I am locked out of the https://gophers.slack.com/ > 2FA. > > Slack tells to

[go-nuts] Re: Deleting the /r/golang subreddit

2016-11-24 Thread Jon Calhoun
A few things I think are worth considering: a. If r/golang is deleted, what is going to stop someone else from creating another go oriented subreddit? And if this happens, will people like bradfitz having less control be a good thing? Sure, a new subreddit might not grow as quickly without any

[go-nuts] Re: multiple html templates

2016-11-28 Thread Jon Calhoun
What you are doing seems pretty normal. You could technically parse each HTML file into it's own template and then just use baseTemplate.Execute(...) and dataTemplate.Execute(...) in your code instead, but I really doubt what you are doing has a noticeable performance hit (if it even has

[go-nuts] Re: Json-ifying map[bson.ObjectId] is not as expected

2016-12-21 Thread Jon Calhoun
The first bson.ObjectID that you show isn't actually what is stored in the object, but rather it is hex value of the object ID that is acquired by calling id.Hex() It looks like that isn't what gets printed out when marshaling your map, and instead the IDs are printed out as whatever the raw

Re: [go-nuts] Re: text/template: cannot index from map[int32]string

2017-05-20 Thread Jon Calhoun
As a temporary fix you could create a custom function for when you are using maps with an int32 key. This is less than ideal but would work temporarily - https://play.golang.org/p/IOa_p4gxDB On Saturday, May 20, 2017 at 12:26:46 PM UTC-4, bup...@gmail.com wrote: > > I reported this as issue #204

[go-nuts] Newbie How to read unmarshall a varient struct in Json

2017-06-04 Thread Jon Calhoun
See the last section of this article where it talks about generics - https://blog.gopheracademy.com/advent-2016/advanced-encoding-decoding/ It isn't exactly what you are doing but the same idea should work in your use case. The encoding/decoding code becomes longer but it makes using the data s

[go-nuts] proposal: infer module name via version control when running `go mod init`

2021-05-11 Thread Jon Calhoun
Hi everyone, Posting this here to get some general feedback before consuming anyone's time with a proposal on Github. The current behavior in the Go tooling is to infer the module name when running "go mod init" (without a name) inside of $GOPATH/src/github.com/username/repo. Here is an exampl

Re: [go-nuts] proposal: infer module name via version control when running `go mod init`

2021-05-12 Thread Jon Calhoun
ohir wrote: > Dnia 2021-05-11, o godz. 11:14:24 > Jon Calhoun napisaƂ(a): > > > it saves me a handful of keystrokes at best - so I understand if it > doesn't seem > > worth the effort. > > Right. > > > It feels close enough to the current behavior

Re: [go-nuts] proposal: infer module name via version control when running `go mod init`

2021-05-12 Thread Jon Calhoun
et someone familiar >> with each VCS take charge of that specific PR using existing VCS >> implementations as a pattern to follow. >> On Wednesday, May 12, 2021 at 7:28:11 AM UTC-4 ohir wrote: >> >>> Dnia 2021-05-11, o godz. 11:14:24 >>> Jon Calhoun napis

Re: [go-nuts] proposal: infer module name via version control when running `go mod init`

2021-05-12 Thread Jon Calhoun
;t be inferred from the location within $GOPATH/src. > > On Wed, May 12, 2021 at 11:01 AM Jon Calhoun wrote: > >> I suspect that the VCS path gives nearly the same level of confidence in >> practice. My personal experience shows that it is pretty rare for the two >> not to