Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Cup o' Go

Cup o' Go artwork

Cancel culture is really getting out of hand in the Go stdlib

Aug 1, 202628 minAudioEpisode 166
ShareXLinkedInFacebookWhatsAppEmail

oapi-codegen v2.8.0 released with OpenAPI 3.1 support 🚫 Proposal accepted: Drop support for net/http.Transport.CancelRequest πŸ—‘οΈ Blog post: Watching Go's new garbage collector move through the heap by Phil Eaton ⚑ Lightning Round πŸ•ΈοΈ typst-go-wasm πŸ€– Microsoft Agent Framework for Go β˜… Support this podcast on Patreon β˜…

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

Shay NehmadJonathan, you made a mistake. I'm gonna have to correct you in this episode. This is Cup of Go for 07/30/2026. Summers creep into an end. Keep up to date through the important happenings in the Go community in about twenty minutes per week.

I'm Shay Nehmad.

Jonathan HallAnd I'm Jonathan Hall.

Shay NehmadHow are you planning to wrap up the summer? Any crazy plans, for example, next week?

Jonathan HallOh, yeah. Today, my mother gets here and she's staying for two weeks. And part of the reason she's staying for two weeks is to help comfort for me while I'm gone next week to Seattle to go for a call. So I don't know if you wanna do this show without me next week, but I'm gonna be busy partying up with gophers. So, yeah, just count me out.

Shay NehmadI am jealous. But no, we will just delay the recording to Monday. It'll be fine. Filippo, cut here for a second. A few moments later. Sorry. My boss walked in. You know how that is.

Jonathan HallI just That should that should be the the

Shay Nehmadteaser for You that know what?

Jonathan HallWe can do that for sure.

Shay NehmadSo, yeah, who are you gonna meet at Gopher Con? You I planning to don't know.

Jonathan HallI know Bill Kennedy is gonna be there because we've chatted about that. I expect I'll meet some other folks, maybe some of our listeners. I hope that some of our listeners will come introduce themselves and I can chat with them.

Shay NehmadAnd you probably have a bunch of stickers. I remember you had like a I million

Jonathan Halldo have some stickers I will be taking and probably a cup of go shirt that I'll be taking.

Shay NehmadNice. Oh, the new shirt? Did it make did it make it?

Jonathan HallIt's here. Bro. I've got it.

Shay NehmadAspas. It works.

Jonathan HallI'll be wearing it.

Shay NehmadNice. Nice. I got mine as well. It's a bit too big. I I I'm still not used to American sizes, but it's fine. Anyway, today we're gonna talk about release, a proposal, a couple of blog posts, a tool for generating stuff, just a little bit of a hodgepodge. Last week was very proposal heavy. So you wanna kick us off with something by Jamie, friend of the show.

Jonathan HallYeah. So Jamie's project, OAPI CodeGen has a new release version 2.8, which now supports OpenAPI 3.1, is a big milestone for anybody who cares about OpenAPI. This is a big one. Jamie,

Shay Nehmadplease re release it and make sure your version is the same as the OpenAPI version. Just make your version 3.1. I don't know if you guys discussed it, but like if your project is following a different project, then the versioning scheme should be the same. It will make my life so much easier if I see that OpenAPI cogen or OAPI cogen, sorry, is version 3.1, because then it's very easy for me to know that it's You know what I mean? Anyway, sorry. Yeah, yeah. I'm gonna get off my soapbox here. What is in this new version?

Jonathan HallThere are reasons that's not always possible, by the way. The most obvious one would be, what if you support two different schemas, one from OpenAPI and one from GraphQL or whatever. You can't follow both. I don't know if that's relevant to this project, but anyway. Yeah, the big headline feature is OpenAPI 3.1 support. A few other things, now it requires Go 1.25. It does include some breaking changes which you'll care about if you're using an older version or upgrading. Trailing slash routes on that HTTP server are no longer act as catchallels, for example.

Shay NehmadEverything changes in code generators are always tough. It's the sort of thing you think about like a compiler that's always going work the same, but it actually doesn't work like that.

Jonathan HallRight, right. I don't know that these will all There's only like two things. The other one being security sculpture no longer committed by default. So hopefully it won't affect too many people in too many ways.

Shay NehmadYeah, but 3.1 support is huge. It's really important. I've been using 3.1 for all of my API documentation, which at Adoption is like a big thing. A lot of customers actually have been, you know, since day one, I've been like, our API has to be really good because customers will integrate with our product. And, you know, products people are like, no, let's do features. And when someone asks to, you know, have an API, then fix it. And I was like, no, you gotta have it day one, otherwise it's not gonna work. And then customers started integrating with our stuff without even without telling us. And I was like, yes, I was correct. And having great tools for generating, you know, SDKs and stuff, agent skills, whatever, from OpenAPI documentation is really important.

So great stuff, Jamie. Good work. How many stars does this project have? I'm wondering, like, I know I I because I think of it as like a project of a friend. Yeah. This is like a serious, serious project.

Jonathan HallOne one k forks. 8.5 k stars.

Shay NehmadYeah. I never understood the forks as a metric. Like, it doesn't make any sense.

Jonathan HallWhat do you mean? Like, do you know what it means or or why it

Shay Nehmadmatters? I know technically it means a thousand people pressed on the fork button, but I know for a fact that there aren't a thousand people maintaining different versions of OAPI cogen. I think people just click it sort of next they think it's like like and subscribe or something. You know what I mean?

Jonathan HallIt might be. But look at two ninety three contributors. That suggests that at least two ninety three people had to click the fork to create a pull request.

Shay NehmadOh, unless you can create a pull request on this repo? But you have

Jonathan Hallto have right access to the repo to do that, which

Shay Nehmadmeans you have Oh, yeah, yeah, Got it. Got it. Got it.

Jonathan HallSo that just probably means roughly four times as many people that's contributed have forked it to make a hack to either for a probably not like a maintain fork, but just like, is this something I can reproduce? Can I figure out what's going on here? So I think that 3,000 number makes sense.

Shay NehmadYeah. And it deals I with 10,000

Jonathan Hallcertainly fork far more projects on an experimental basis than I actually contribute to, you know, just to see, you know, maybe there's a bug here and then I discover there's not or that it's not relevant

Shay Nehmador I'm trying

Jonathan Hallto work around or something

Shay Nehmadlike that. It's totally beside the point, but I wish I could like temporarily fork. And then if I don't push to it in in, a seven day period after that, it, deletes the fork. You know what I mean? You you certainly can't get all these digits on garbage around.

Jonathan HallYou have to delete it yourself.

Shay NehmadAnyway, good work, Jamie, this, like, very success clearly very successful open source project in the new version. And I don't know, I use it, so I'm I'm one of the 10,000 for sure. Although, you know, a lot of people have thoughts about cogeneration. Some people don't super love it, but,

Jonathan Hallsome

Shay Nehmadof them might be in this room right now. We were having live commentary from the, like, peanut gallery on the episode. Anyway, I at the request of my boss, I also hate cogeneration now. Official position. Anyway, let's talk about one proposal. Last week, we did a ton of proposals, but I was really interested in this one. Just because of the drop support, I was very surprised at drop support. Can you explain what is a drop support for transport. Cancer request?

Jonathan HallYes, can explain it. So this proposal has been accepted. So I think this will come in 01/20, probably 01/28. I think it's too late for this to land on 01/27. So, one hundred twenty seven will still support transport. CancelRequest, but 01/2028 coming next February will not. What is it? It's a way to cancel an HTTP request that is in flight. You may not have heard of it. Have you

Shay Nehmadheard of

Jonathan Hallthis one? Have you used it? You probably use it all the time, right?

Shay NehmadSo I'm sure that I've implemented, you know, once the server gets serious enough and does enough things, you want to be able for example, you know, someone sends you a request and then they close the tab or whatever, you wanna cancel the the context. So, you know, if you have DB requests flying or any side effects going on or whatever, for them to get canceled or rolled back as well, right? So let's say someone opens up a billing page and then presses pay and then closes the tab, you wanna cancel that payment. You know what I mean?

Jonathan HallRight.

Shay NehmadSo I know that I've used some mechanism to implement something like this in Go once, but I have some questions. I don't know if I use this specific function.

Jonathan HallSo you're talking about server side, this is client side. This is for you're making an HTTP request to a client and you want to cancel it before it returns.

Shay NehmadI'm making an HTTP request as a client.

Jonathan HallAs a client, Right, to a right. So this would be the HTTP dot client object and you want to cancel that somehow. One way you can do that is with a function called cancel request on the transport. So, have to reach into the transport that's in the client and say cancel this request. I would bet you a lot of money you've never used this feature. And if you have, it was a long, long time ago because this actual feature was deprecated in Go 1.6 in 2016.

Shay NehmadWait, but I know canceled requests also as a client to other microservices.

Jonathan HallSure. So you probably did that using a different mechanism because there's three of them now.

Shay NehmadOkay. Oh, and this proposal is about like making it two, being it two?

Jonathan HallRight. So this one, this particular one was deprecated in 2016, ten years ago, And it was added in Go and it was deprecated in favor of a new one called request. Cancel. So, you may have used that one, which lets you rather than having to reach into the internals of your client on the transport and canceling a request that way, you can now just on the request object cancel directly. That was added in Go 1.5, this old one was deprecated one version later in 1.6. But then in Go 1.13, we implemented a new version which you probably have used, which lets you use a new request with context and you can just cancel that context and that cancels the request. So those are the three mechanisms. The oldest of those three is being finally removed after being deprecated for ten years.

Shay NehmadOkay, I got it. And the reason for deleting it is just to like clean up stuff or is there a specific It's reason why

Jonathan Hallit's basically clean up, yeah. Because maintaining this third way to cancel requests requires some maintenance. Now, to be clear, it will still be available behind the Go debug flag for four more versions. So, this will be fully twelve and a half years deprecated before it's finally completely removed from Go. So, it's going to be in Go 127, is coming out next month. It will be removed except for GoDebug and Go 1.28 and then 1.29, thirty and thirty one will still have it behind GoDebug flags. It will be Go 1.32 before it's fully actually removed completely and you can't use it anymore.

Shay NehmadI'm specifically excited for Go 32, like a nice round number.

Jonathan HallYeah, the next time we'll have such an exciting release will be Go 1.64, which will be very long.

Shay NehmadWe'll probably be at Go two by then with all its error handling and Whatever. Other break Okay. This sounds very reasonable, but it does lead to, like, a design question I have for you.

Jonathan HallOkay.

Shay NehmadOn the server, isn't it, like, super difficult to actually implement handling request cancellation correctly?

Jonathan HallI mean

Shay NehmadI've I've thought about it a few times, you know, someone Yeah. Sends a Someone sends a request from a browser. Let's say it's not like very specific code, then they close the tab or whatever. Theoretically, you should get a signal, right, or they move to a different part of the application. You should get a signal like, oh, I don't want this API request anymore that I sent. But like, what do you do on the server level to handle this like gracefully? You gotta cancel DB connections and then close them gracefully, and you gotta any logs, any traces, got to like sort of undo them because this was canceled and whatever. Like it's I've realized that I haven't I've thought about a lot of things when designing server side, but I haven't thought about this case too much.

Jonathan HallAre you asking as the application developer how difficult it is or like from this standpoint of writing the net HTTP library, how difficult it is?

Shay NehmadNo, I'm talking generically as like someone who's doing server side and back end, not from like the the low level By I the am asking you generically and not specifically about Go because I know you're going to start doing TypeScript and I'm doing TypeScript. So I'm trying to ask about general design because I think in Go it's way easier because you have the context package and if cancel, it's all like way more built in than in other languages.

Jonathan HallSo, I don't know how you do it in TypeScript at all, but the general idea is watch for the cancellation signal, whatever form, whatever form it takes. And if you receive that, then at the point of the work, stop doing the work. And how easy that is to do depends on the work being done. Like if let's say it's something really generic, you're looping over a billion rows or a billion pieces of data to add them together. You could just every thousand rows check, has this been canceled?

And if it is, stop calculating those billion rows and return early, right?

Shay NehmadYeah. But let's say you have a serious API surface, like here, you know, at work, I have a ton of APIs. It's not like, oh, just the three functions that I have to think about. It's like 300 of them, you know what I mean? Or a 100 of them. So basically, okay, implement the generic mechanism to capture that signal once, but you do actually have to think about every single function.

Jonathan HallYeah, every place you're

Shay Nehmaddoing some work,

Jonathan Hallyou need the ability to do that. But you can decompose it so that you only have to think about it in each case as it's done. So you're looping through your billion things, you do that. Or maybe you're blocking on a network connection. So while you're blocking for the network connection, you also check depending on your language and capabilities, you either check periodically or simultaneously for that signal happening. Where it's most difficult is when you need to propagate that cancellation to another service you don't control. And one example where I know historically it's been a problem, I don't know if it still is, is MySQL. In the past and maybe still today, I don't know, it was impossible to cancel a MySQL operation that was happening at least from the Go library. I don't know if MySQL had that capability at a different level, but in the Go library you couldn't just cancel a running MySQL operation. So you could just stop listening for the response, but it would still, my SQL operation would keep happening in the background and then eventually return a bunch of rows to nowhere.

Cool.

Shay NehmadWell, I feel like it's difficult and that I haven't thought about it enough, but at least this proposal will make it marginally easier for me to pick which function to do on the client side when I'm implementing this between microservices. Yeah. That was my tie in. It's kind of weak, but I just wanted to get a It design lesson

Jonathan Hallwas for because if you had if you had somehow found that one and decided you wanted to try it, you would have immediately seen the deprecated don't use this documentation stuff.

Shay NehmadYeah. I love it in my ID. It's like it has all strike through through it. It's like the teacher giving you with a little red pen. You remember in school?

Jonathan HallYes. For sure.

Shay NehmadAll right. I wanted to talk about a few blog posts, looking at the time of this episode, I think I'm only gonna have time for one. I also wanna clear the record here and like clear my name. I have more than one shirt. It just hand ended up that I'm wearing the same shirt like three times for this episode. But don't worry, I have more than a single shirt.

Jonathan HallThis is just the one you keep on the shelf behind you.

Shay NehmadIt just it just turns out that I'm I'm wearing my dream theater shirt for these episodes. I don't know what happened. But I have multiple shirts, I promise. So I don't know if you remember, but episode one one two, we had a live episode in San Francisco where we introduced the green tea garbage collection garbage collector algorithm. That was really fun. Well, one last thing on the backlog that we really wanted to get to is this sort of big and sorta intimidating proposal about green tea garbage collection, which I opened and started reading and got intimidated and closed it and put it like, tagged you on the backlog so you teach me about it. But I have to admit, you know, I sort of vaguely remember how it works from just talking about it in that episode, but I wouldn't be able to, like, give you a lot of details. And then I saw this blog post from Phil Eden on a site called theconsensus.dev, we'll get back to that in a second, called watching Go's new garbage collector move through the heap. I love this blog post. If you're like me and you like digging, you know, opening up the hood and seeing how something works, This is really cool.

So it takes a go and c sharp, by the way, if any of the Genentech people are listening, and sort of compares how they're how they're allocating objects on the heap, how they, like it walks the address space. And instead of being a blog post that's like, oh, this is how it works with some visualizations, it gives you commands and code that you can run and actually look, and it prints out how the heap looks. So you run the code, it's called heapach. Go, you can copy it, and then you'll see like, literally, you'll see the code print out where objects are on the heap, which I thought was really cool. I never thought about being able to do that, but of course you can do that, right?

And if compares Go and C, I sort of don't want to ruin it for you, but there is one interesting thing where Go puts all the same objects in the heap, objects of similar size together because of how Green Tea works with it later and C doesn't. And some performance comparisons of like how the mark and sweep works and how fast it works and stuff like that. I really, really like this blog post. I highly recommend just checking it out. There's also some Python in it as well.

And then it compares how many references, how many misses you have, blah, blah, blah. Real, really good stuff. Have you ever like dove that deep into how the garbage collection works?

Jonathan HallNo, never. Have only the biggest sense of how garbage collection works. Happy to

Shay Nehmadlook I at didn't to. Need to. And I think probably you didn't need either. I think 99.99% of developers don't, but I really think it's worth it to like check out this blog post. It teaches a lot of good tools and very interesting stuff. It looks at a worst case, etcetera, etcetera. But I was surprised, it's like, this is a really high quality blog post. So I looked up Phil Eden, because usually when someone writes this well, they like have more blog posts that are really good. And I just wanna shout out this project page, company, I'm not sure exactly what it is, theconsensus.dev. It's Phil Eden's like thing.

He's just writing really, really good blog posts and you can sponsor him by posting some job openings or sponsor it directly. But yeah, I think it's really good. I looked at a few other blog posts here, just a lot of good stuff going on here. And I think it's relatively new as well. I read the about page and his like personal blog. And also if someone knows Phil, we would love to have him on the show. So maybe I'll shoot him a message as well. But a really cool website, The Consensus. Seems like high quality human writing, which is very much in need right now. Yeah.

Alright. We're at the time, so let's move to a quick lightning round. Lightning round.

Jonathan HallAll right, lightning round. Yes, we had an interview planned, but last minute rescheduling occurred. So we'll do that at some point in the future. So this is a quick episode, but for the lightning round, I wanted to share a tool called Typist GoWasm. It generates PDFs from Typist templates, and it runs entirely in process using WebAssembly. Are you familiar with Typist?

Shay NehmadI think it's PDF for invoices or something like that, like a template language, but I'm still using, like, Lech and and LaTeX and whatever.

Jonathan HallOh, yeah. Yeah. Laifenfeld. Laifenfeld.

Shay NehmadI feel very smart when I use Laifenfeld, but now that AI can write the Laifenfeld thing for me, it sort of took the sting out of it.

Jonathan HallSo, typist is basically my understanding is that it's a templating language kind of like markdown, but with a lot more capabilities in markdown. So you can do graphs and diagrams interesting things that you can't do in markdown alone. But this could I'm merge

Shay Nehmadalways down for these frameworks, new frameworks. I unfortunately think that because of AI generation, people are just gonna start sharing HTML files. That's actually what's gonna happen if you need like a graph or whatever, because it's so easy to create these like artifacts now. But that's okay. So this is a Go project that lets you generate a PDF from a types template?

Jonathan HallThat's right.

Shay NehmadWhat's the Wasm part then?

Jonathan HallSo I guess it's just designed to run-in WASM. I don't know if it runs only in WASM. I would've

Shay NehmadOh, got it. So you can run it, like, in the browser.

Jonathan HallYeah. You can run it in the browser. Cool. Cool. Cool. Yeah.

Shay NehmadAwesome. Yep.

Jonathan HallWell,

Shay NehmadI have two lightning round items.

Jonathan HallThe

Shay Nehmadfirst one is as foreseen in the beginning of the episode, you're wrong.

Jonathan HallWhat?

Shay NehmadI wanna correct you. Last episode you said that about an example. Anything that starts with example is gonna be an example. But Giuseppe Giuseppe Maxia. Shout out, Giuseppe. I hope that's how you pronounce it. The compiler is stricter. The name of the function must be example existing function or example existing type, existing method. Must be. So you misled our audience and we will take you to the town square after this and just rip out your ranks, make you write the JavaScript for for a few months.

No. Just kidding. My real lightning round thing is the Microsoft came out with a new Go Agent Framework. First of all, it's cool because the Microsoft for Go developers finally has a single blog that isn't Go Build is now available. But, yeah, a Microsoft Agent Framework, it's theoretically open source, but it's very, very clearly if you're building agents on Microsoft, so you have like Foundry provider and stuff like that, Azure provider, Azure credential.

But it's a good way to, you know, include a lot of tools, MCPs, middlewares, wares, and human in the loop approvals. It looks like a pretty thoughtful project in terms of how it's designed. So if you're building like code based agents, it's a pretty good way to do that. There's also the dot net SDK and the Python SDK. So, you know, it's part of a more overarching framework in general for like building and orchestrating AI agents.

So if you wanted to do that in Go, now you can do it. I think that wraps it up for us.

Jonathan HallI think it does. We'll see you in a week and a half ish since next week we'll be recording the following beginning of the week, right? Yeah.

Shay NehmadAs promised, no ad break, but just a quick mention that this show is supported by you on Patreon. Thanks a lot to our Patreons. And if you want to find all the things, you can find them at peppago.dev and that we're not recording next week because of the GopherCon, so we'll get back to you in like a couple of weeks.

Jonathan HallAwesome. See you then. Program exited.

Shay NehmadGoodbye.

Open the transcript file

Hosts and Guests

Hosts

  • Jonathan Hall Host Feed-stated
  • Shay Nehmad Host Feed-stated

Guests

  • Filippo Valvassori BolgΓ¨ Editor Feed-stated

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Collection inception

    Nov 24, 202632 minAudio

    Go 1.27.4 and Go 1.26.11 released NGINX RCE Go collections proposals β˜… Support this podcast on Patreon β˜…

    Credit the people on this episode

  2. Waiting for the break of day as Go turns 17

    Nov 14, 202624 minAudio

    proposal: net/netip: add netip. Addr. To6() FOSDEM'27, Jan 30 & 31 @ Brussels, Belgium Golang SF on YouTube Go Turns 17 Observability Full Course: Logs, Metrics & Traces on YouTube Interactive course @ Boot.dev β˜…...

    Credit the people on this episode

  3. πŸŒ‰ Ready, Sets, Go! Live from SF, hosted by Assembled!

    Nov 7, 202618 minAudio

    Thank you to https://www.assembled.com/ for hosting Cup o' Go! Go Sets proposal: go test should run analyzers specified by the workspace Vercel Go Support Lightning Round: JSON v2 Phuong Le's YouTube about Go β˜… Support...

    Credit the people on this episode

  4. Maps and CVEs: They just keep growing!

    Oct 31, 202627 minAudio

    πŸ—ΊοΈ Accepted proposal: add maps. Grow πŸ‡ͺπŸ‡ͺ IVXV online voting system Reddit thread 🐧 Protecting against CVE-2026-98432 🌩️ Lightning round agent-manager tinygo 0.44.0 released β˜… Support this podcast on Patreon β˜…

    Credit the people on this episode

  5. 4 Is Not a Secret & Go Dev Advocacy with Ainsley Clark

    Oct 24, 202644 minAudio

    Do the 2026 Go Developer Survey, and tell them Cup o' Go sent you! Go 1.27.3 and Go 1.26.10 are released due to eMudhra Intermediate CA Compromise Interview with Ainsley Clark AinsleyClark.com templ β˜… Support this...

    Credit the people on this episode