|
Sub Par posted:I am new to Go and have a dumb question. I have a template in which I would like to render something resembling a calendar. As part of it, I'd like to generate 31 identical divs. I don't really understand how to use the range operator to do this - the internet seems to be replete with examples of how to use range to iterate over slices and whatnot, but nothing about how to do what amounts to a basic for loop. Help? go template docs posted:{{range pipeline}} T1 {{end}} This is idiomatic to Go: code:
|
# ¿ Jan 22, 2016 21:19 |
|
|
# ¿ May 4, 2024 15:57 |
|
Docker, rkt, Kubernetes, InfluxDB, Prometheus, etcd, pretty much everything by Hashicorp now. It's really gaining traction where it counts — in large scale projects built to be used by a poo poo load of people. Personally, I think it's fun to read and write, and it gets to the point. I echo Bozart in that it's my go-to language now. It works pretty well for API's fronting SPA's and for small tasks.
|
# ¿ Mar 11, 2016 04:59 |
|
If you're unsure about the number of things you're going to pass on the channel, you can also use a WaitGroup. Notice that the WaitGroup needs to live in its own goroutine in order to be able to close the channel:code:
|
# ¿ Jun 27, 2016 22:58 |
|
I think glide is the up and comer. At Gophercon more people raised their hands when Kelsey asked about glide vs godep, but I think that's inertia as opposed to momentum. We use glide at work.First Time Caller posted:Really cool poo poo. Why is thread so inactive, go is awesome. It's still a pretty niche language by overall usage, even though it seems like literally everything new and awesome is being written in it: Docker, Kubernetes, Prometheus, pretty much everything in the Hashicorp stack now.
|
# ¿ Oct 9, 2016 17:45 |
|
MALE SHOEGAZE posted:My main complain about go these days is that the community is full of luddites who are hostile towards both useful language features and anyone introducing a new library that attempts to do...anything. My main experiences are on the golang reddit, though, which is no longer an official community. So maybe it's not representative of the real go community. I don't think the /r/golang was ever a real community to begin with. Not very many people, and most of the content was just hotlinks to random projects. The fact that they "killed" it because of the Reddit CEO's thing was just silly. The Golang Slack is a pretty good resource.
|
# ¿ Dec 13, 2016 15:29 |
|
https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package might be worth a read.
|
# ¿ Jan 15, 2018 17:53 |
|
^^ a good post. The package management piece is in the process of being baked now. I won’t go into the craziness, but there was “dep” for a while, which is now in the process of being replaced with vgo.
|
# ¿ Aug 6, 2018 01:21 |
|
e: very wrong thread.
|
# ¿ Sep 9, 2018 23:39 |
|
|
# ¿ May 4, 2024 15:57 |
|
Don’t remember if this was posted before but it’s making the rounds now. Dave Cheney posted an article constructed from his practical go talk. It’s really, really good. Goes into the philosophy of Go, as well as idiomatic concepts. Well worth your time.
|
# ¿ Feb 24, 2019 15:08 |