🌉 Ready, Sets, Go! Live from SF, hosted by Assembled!

Shay Nehmad:

This show is supported by you. This is Cup of Go for 11/05/2026. Keep up date to with the important happenings in the Go community in about twenty minutes per week. Coming to you today live from the beautiful assembled offices in San Francisco. I'm Shay Nehmad, and I'm hosting this episode alone because Jonathan is on central time.

Shay Nehmad:

Let's get to learning about some new things in Go. The first thing I want to talk about is Go sets. So if anybody here did like math in university or whatever, you might remember there's a thing called the set, which is like a group of things that don't repeat, which is very, very useful. Anybody wants to raise their hand, how do you do a set in Go?

Assembled:

Well, you do a map key and then an empty struct.

Shay Nehmad:

So, Simon, you mentioned you need to do it with a map with a struct, a key and a struct. That doesn't work like that anymore because, well, it will improve because there's now a proposal for a package with a generic set type. So Go is sort of was sort of known for not having generics and then they introduced generics and now they're sort of discovering all the good things that generics can add that other languages are looking at it like, why didn't you have it already? One of the things that to me was very much missing was just a normal set where you can add something and if it's already there, it won't get added again, right? And check if something is in the set.

Shay Nehmad:

The workaround wasn't that bad, like having a map, but it always felt kind of iffy. And now there is a way to do it. And I'm gonna use a trick from Anton who was on the show.

Anton:

My name is Anton. I do some open source stuff, and I write interactive, maybe I can call them guides or books, and interactive articles on my blog. That's mostly what I do in my free time.

Shay Nehmad:

So I took Anton's open running code in the browser thing. I pointed it at Go Tip, so like the latest development version that has this proposal in it, and I'm importing x collection set. And this is just how you use it. This is literally the example from the proposal verbatim. If you wanna skip the entire proposal, they discussed a ton about the specific interface and whatever, and they came up with this pretty nice API, in my opinion, which you have set dot of, and you can put a set of a few elements.

Shay Nehmad:

This was a big bike shed in the proposal because they debated whether to do set dot set of or set dot of. Not a big deal. I like set dot of. It's a little shorter. And then you have what you would expect, which is x intersection with y.

Shay Nehmad:

This is an audio show, so this is not gonna carry. And also here, it's gonna look a little weird. But imagine two circles. Right? The intersection is the part like in a Venn diagram.

Shay Nehmad:

The intersection is the part in the middle. So that's what that does. You have union, which is both circles, everything. You have difference, which is everything but the part slice in the middle, and of course contains x or contains y. But I know when I wrote this example, when I copy pasted it from the proposal, there was immediately like, oh, this looks like old math, hard for me to understand and there...

Shay Nehmad:

I didn't wanna actually implement the circles. So I looked at a more realistic example. Brian talked about, oh, Go is perfect for Kubernetes and we like doing Kubernetes all the time. That's why we do Go in the first place. So the example I took was, okay, I have the desired.

Shay Nehmad:

So I created a set of desired things. In this case, it's gonna be API web and worker. These are just strings in the... In this example, but it could... They could be more complex structs and running, which is a set of API web and old worker.

Shay Nehmad:

And I can understand which ones I need to start if I do desire the difference from running, which ones I need to stop if I do running difference from desired. Difference is like minus. Yeah. And to keep is the intersections is the ones that are desired and are running. And if you, run it, and hopefully this works, it does, you can see that I'm working on Go, 1.8 devel, so like the latest, tip.

Shay Nehmad:

It tells you that you need to start the worker, you need to stop the old worker. This is... Please don't sue Cup of Go for ageism. This is just like... The old...

Shay Nehmad:

The worker is old, the employees are old. We're all gonna get fired soon because the agents don't worry about it. And you need to keep the API in the web. And you know what's running now if you take the union, etcetera, etcetera. So there's this new set API that's gonna come in one point twenty eight.

Shay Nehmad:

Now you don't have to use it, but I ran a few, like, modernizers, not a go fix modernizers, not analyzers, just agents going through my code and telling me where are all the places where you did the set workaround and it found quite a few that I can just drop and replace. I'm not sure if there's gonna be a modernizer for that because it's gonna be very difficult to look at people's like homegrown workarounds. But just today in the meetup, we learned a lot of tricks about, like, detecting and rewriting this stuff. So if you know how this pattern looks like in your code, you can find it. So the new Go sets, this proposal has been accepted.

Shay Nehmad:

I think it's gonna be implemented in one point twenty eight. It's not really a standard library because it's in the X package. But, you know, slowly, I see the X prefix is just pre STD for most stuff in Go. It's sort of like Boost in old c plus plus So, you're gonna have, sets now. So you basically need to unlearn the previous workaround.

Shay Nehmad:

The second proposal I wanted to talk about with actually... Which actually Jonathan added and I'm stealing from him. You wanna do them? Come to the show. Is that a Go test should run analyzers, which are specified by the workspace.

Shay Nehmad:

So when you run... Which is very relevant to what Simon just said, talked about. When you run Go test today, what does it do? It runs the test. Right?

Shay Nehmad:

But that's not... It... That's exactly what I was about to say. It's not the only thing it does. It also runs a subset of the analyzers that GoVet would run.

Shay Nehmad:

So if you have an obvious problem in your code, GoTest will tell you, even if you didn't run GoVet specifically. I think this is useful because obviously if you can find things with Vet, which is faster than setting up the test, maybe your test sets up like a DB, blah blah blah, You get the feedback faster. And this proposal by Alan Donovan is all about not only adding more analyzers, it's about adding custom analyzers. So if you have your own analyzers that you would like Go Test and Go Vet to run, you can do that. This requires exporting a pretty interesting interface.

Shay Nehmad:

It requires exporting some things from the Go analysis package. So you'll be able to write your own analyzers because you need like all the structure and whatever. The thing I found while this is, you know, a proposal and I don't think it's been accepted yet, it's probably going to just because it's proposed by some of the people leading this project. It's relatively new and I think a lot of the discussion is about like which analyzers would people add. This sounds great on the surface.

Shay Nehmad:

I am not seeing like a specific analyzer I would add that I don't have a GoLang CI lint for already that always runs before Go test anyway. So for me, this is like, yes, we can do it, but it's sort of not what I expected Go to have, because Go usually has one way to do things. Right? And this is, oh, run like some analyzers in two places. The discussion is ongoing and this is literally from seven hours ago, like is GoFix included?

Shay Nehmad:

Is it not included? There's very active discussion of people really, really care about this, which to me is, I don't know, was surprising because I was like, whatever, you can do it or not. And this is not accepted that this is still like in the forming phases. So if this is something that interests you or you have a specific analyzer, custom analyzer that you would like to give as an example, which is probably the most useful thing people can contribute to this discussion right now, you can go to this proposal, 82,464, and just like let Alan and the team know what's your like use case and connect it to it. One final item on the news agenda before we leave for an ad break is that Vercel and Next has native Go support or it's coming soon.

Shay Nehmad:

And if it confuses you, it also confused me when I saw it on Twitter or X or whatever because, like, isn't Next and Vercel like the front end, the the React app company? Like, how comes it has Go? But yes, they're prototyping native language support in Next. Js. So you could have route handlers in Go in your Next app, which if you're using Next is like great news because you can drop in Go without a separate back end for like hot reloading and stuff like that.

Shay Nehmad:

Now, this show is not sponsored by Vercel. If they would like to sponsor us, please ignore the next two minutes of the show. I don't love Vercel. I think they're here in San Francisco. So I'm like, okay, home team.

Shay Nehmad:

I'm I'm I'm rooting for them. But to me, it's just a little bit of vendor lock in me. Like there's a lot of ceremony and whatever. But definitely if you had a React front end and then some server side components, like maybe your auth and whatever, were in React and then uncomfortably your like quote unquote real backend wasn't Go, if you're in that situation, now it's like obviously a great pick for you. And it definitely adds points for me for picking it.

Shay Nehmad:

I don't know if I necessarily would pick it yet, but it's definitely like a nice dev tooling improvement. And one of the things that's nice about like being in this industry and also Citi is that CEOs just like go on Twitter and answer like random questions. So Guillermo, who's the Vercel CEO, was like, next native is coming. The whole world will be native, which is like, sure, whatever, whatever we can do to have less JavaScript the world, I am all for. Fewer interpreters is great.

Shay Nehmad:

Sorry, Brian. But, you know, it's the claim is, oh, safe performance and cost efficient. And the primogen who's also like a code content creator sort of person, by the way, the Primogen come on cup of go already, was like, oh my god, does this go? And I found a very interesting, like, the CEO basically saying, yeah, it was gonna be Rust, but iteration speed wise, it's not there yet, which is very interesting. I dug into a few other threads on Twitter and talked to some people who do, work there.

Shay Nehmad:

And what I found out that this is not Vercel's official opinion or whatever, but the whole thing is that it hot reloads. Like if you've used Next, you know that it hot reloads your server. So you save a file, then it will only like recompile that TypeScript and you'll have... You can experiment pretty quickly, which is super nice. And it's a great feature and the the CLI looks great.

Shay Nehmad:

If you add Go to it, it works pretty well because one of the main features of Go is that it compiles super fast as well. So you can just recompile your whole Go thing and sort of hot fake hot reload it, even though it's a new native binary. And with Rust, I haven't done Rust in production in a while, but when I've done it like two, three years ago, compilation speed was a problem. Like I would compile and then it would take a little while and it would take a lot of room. And if you're trying to hot reload things like every second changing code, whatever, especially if you have multiple agents hacking on the code, which I think what is their vision of how development will be in the future, from what I gathered from talking with them, it doesn't really drive together.

Shay Nehmad:

That doesn't mean that it doesn't have any useful use cases. Of course, it has. But, yeah, another another w to chalk up for, the engineers who build Go wanted it to compile really, really quickly. By the way, this is not on par for the show because usually we don't do like corporate news. But Next and Vercel are like sort of open source.

Shay Nehmad:

They have an open source arm as well and I think it would be relevant to a lot of listeners of the show, especially you dear listeners who are developing Frontend right now and just can't wait to get the cross the line to back end. Don't worry, we're all here waiting for you, rooting for you. These are the news items for this week. As I mentioned at the top of the show, this show is supported by you. So feel free to support.

Shay Nehmad:

The best way to support the show is probably financially through Patreon, but honestly, better would be to share about the show to a colleague or whatever, just get them to listen to the show. We don't pay to advertise and we don't plan to, we just wanna grow by word-of-mouth and we have been growing. The stats have been really great lately, like a lot of downloads, I'm really happy about that. And before we go on and now an ad break and then a lightning round. Thank you so much for, coming to the meetup and listening to all these, items.

Shay Nehmad:

This this is all we have for now. We have just lightning round left. But before that, this episode was supported by you, but this one is specifically sponsored by Assembled who are hosting us in their beautiful San Francisco office. I've always wanted to say it like this. So now to a word from our sponsors, Jay, take it away.

Assembled:

Thank you. Thank you. Hey, everyone. I'm Jay. I'm on our engineering team here at Assembled, where we build workforce management and AI agents for support teams.

Assembled:

Our workforce management helps customers or helps companies schedule their support team members and AI agents together, and we build our own AI agents to help companies improve the support experience for their own customers. We use a lot of Go here. Our whole backend is in Go. We're always looking for great people. We have a couple of open roles if any of you are interested across some different product teams.

Assembled:

So check us out at assemble.com or find us here in person after this. Thank you.

Shay Nehmad:

And thank you assembled for hosting the Go SF community. We hope to be here again, not too soon because we're looking for other companies, but maybe next year, which is actually soon, like end of next year. We'll talk about it. Thank you so much. Lightning round.

Shay Nehmad:

Quick lightning round. Lightning round is section where we have items that we just want you to know about and we don't have time to actually talk about. So the first one is there's a blog about JSON v two. This would warrant like two episodes, but we already talked about it in like four episodes. So if you missed those episodes because you're a new listener, just go read the new blog slash jsonv2.

Shay Nehmad:

As Simon mentioned, if you were here in the meetup, there's now a new version of JSON, which is basically better in every way, but because it's a new version, it's very controversial because it's like breaking and oh, what does it mean that we have versions of stuff in in the standard library? It's been six years coming, and now it's here. So just go read that link or alternatively search for the word JSON in a couple of Go episodes. I'm sure there's only like one or two times we mentioned it. The second thing I wanted to mention is there's this new influx of AI generated Go content, whether it's open source libraries and tools or whether it's like videos and content.

Shay Nehmad:

And I wasn't sure what my initial reaction to it was. And people were sending us this thing to the show. Right? Like, oh, I build this thing. And then I look at it, it's like, oh, Claude built this thing.

Shay Nehmad:

So my first emotion was like, oh, they're taking food out of like poor podcasters mouths that are just trying to like create a show. But then I was like, nah, it's fine. If the thing itself is cool, I'll be okay with sharing it even if it's clearly AI generated. So three links. One, there's a great explanation about maps if you're relatively new to Go, with a really, really, really well done video, and I think human, narration.

Shay Nehmad:

I think, I don't promise, but I think it is, which is how Go Maps work, internally with Swiss Stables, great animation style, super clear explanation. I actually watched it on two x, but I watched it all the way through. Really good explanation if you wanna understand how these internals work for interview prep or just for learning. This channel called Ongla, I hope I'm pronouncing that correctly and I didn't butcher name, has a bunch of these on go, so you can go check that out and subscribe. I don't know, I'm not we're not really doing a cross promotion usually, but, this is how it works.

Shay Nehmad:

And another tool which I found interesting that people sent us, which is called Bogie or Bogey or Boujee, which is a very, opinionated scaffold your entire app from one thing. If you've used NestJS where you like generate the entire app and the controller and the service layer and the DB and everything in one command, there are there are a bunch of these are flying around. So this is, one of them. It was sent by a listener. So like I'm all for it.

Shay Nehmad:

It has a bunch of choices that I'm sure people are gonna find controversial like, oh, you have to use River for the jobs or you have to use Gin as your router. And I know that if Jonathan were here, would say like, no, you don't need any router. Just use the standard library or SQL C that he hates and I like. So it's very opinionated, but I like a lot of the choices here. They seem relatively reasonable.

Shay Nehmad:

So if you're just looking to quickly generate the code, but you don't want AI to generate all of it, you just want like a deterministic generator and scaffolding thing, seems like a pretty cool option. And that will do it for this week's episode. Find all the links, previous episodes, and links to Patreon and our shop that is definitely going away soon. I just need to get to that to do on my to do list at cupogo. Dev or email us at news at cupogo.

Shay Nehmad:

Dev. Thank you, program exited. Goodbye! Program exit up. Goodbye.

Creators and Guests

Shay Nehmad
Host
Shay Nehmad
Engineering Enablement Architect @ Orca
🌉 Ready, Sets, Go! Live from SF, hosted by Assembled!
Broadcast by