
This show is sponsored by you. Stick around until after the news to hear more. This is Cup of Go for June 28, 20 24. Keep up to date with the happenings in the Go community in about 15 minutes per week. I'm Jonathan Hall.

And I'm Shay Nehmad, and everything is back to its right place. We're doing an episode. It's Friday morning. We're both tired.

We're both tired. Yeah. I I haven't even had coffee yet. Have you?

Of course. Awesome. I drank I drank coffee out of my brand spanking new, DevOps Days Amsterdam mug Oh.

That they gave up. Rooster's got some competition.

Actually, I think they're using the same supplier because it has the same thing where, you know, the outside of the cup is white with a printout, and then the inside has a color. Okay. Cool. So I guess the imitation is the sincerest form of flattery. Right?

Yeah.

We see you, DevOpsDays Amsterdam. We see you, and we appreciate you.

Well, let's jump into the news. You were surprised by this 1. Tell us what it is.

Yeah. It's just the time, man. The time is blowing by so fast. Go 123 release candidate, 1 is released. I'm not gonna call this release, 1.23 even though that's, like, the the version. Yeah. It's go 123.

So are you gonna are you gonna use it? Is it just go 123 is out? Or are you gonna wait for the point release 124?

Easy as ABC.

Yeah. Anyway,

so, yeah, there's a release branch, of Go 123. And this is a really good opportunity if you want to set up your CI pipelines to build, you know, the new version, start migrating all your linters. This is a really good version to do it in. In my opinion, not for your production application since it's still just the first release candidate, I wouldn't trust it. But it's very good for the community.
So if you have a thing that's running in Go 122 or, God forbid, Go 121, it would be a really good idea to start upgrading and have, like, the next few weeks just reporting bugs, finding all this stuff. It's really useful for the Go team. As usually, you can download it just by go installing it. Right? So you go install and then you type out the, like, entire version 1.23rcone@latest.
You can download the version from the site. And very importantly, if you do do that, it seems like you want to contribute to the Go community. Right? Mhmm. So you can use the new command we talked about in, like, a few episodes ago in the show, go telemetry.
So you can run go 1.23rcone telemetry on. And then not only will you use the new version and possibly report bugs, the Go team will also get telemetry from your usage. So, yeah, the new version is out. The release notes are still in a draft. It's still not released, and it's expected to be released in August when everybody's with their kids on vacation.
As usual, Google picking a great time to to release this stuff. Yeah. So we we talked about all the changes to the language here and there. Right? So Yeah.

The big 1 here, which we won't go into detail, is Range Over Funk. We talk about that a lot.

And we're gonna talk about it later on in the show as well. Yeah. So this is a big 1. Telemetry is now a Go telemetry thing. Like, there's a command.
Vet has, some, improvements, like, including the standard version analyzer, which we discussed in the past. Like, over the last 6 months, we mentioned all these things that got accepted, and we were wondering if they are, like, are gonna make it for, 123, or are they, like, pegged for a future version? Obviously, I have to shout out my favorite feature, PGO. Mhmm. So the compiler itself is a lot better, you know, improved performance in specific loops by 1.5% at a cost of 0.1% binary size, which, you know, is an obvious trade off.
And it's like a lot of cool stuff, and some changes. Most of which we've discussed already in the show. Cool. I think if you want to contribute to open source meaningfully, right, last, I think 2 weeks ago or no, last week in the live episode in Amsterdam. Me and the Amsterdam Go people, not including you

Sadly. Yeah.

Yeah. We discussed how to someone on Reddit was like, how do I prove that I'm good at Go even my even though my work experience is from another language? I think that's a great way to do it. Right? Mhmm.
Install the release candidate, find some real bugs, engage in some real discussion. If I saw that on someone's CV, like a a mid level developer, and he and then they were like, yeah, I contributed some bugs to the latest release in Go. I'll be like, wow, That this person is on top of stuff. So I think it's a really good opportunity for everyone. And, we still have 2 months for until the the version is fully out.
So you don't need to stress out. You don't have to upgrade anything just right right this second.

Right.

So 1, 2, 3.

But if you do wanna upgrade sooner than that, we have other good news for you. You got 1.22.5 and 121.12. That's a nice near palindrome. 121 12. We'll be coming out on Tuesday, with a secret vulnerability fix. So I can't tell you what it is yet, but next week we'll talk about it.

As usual, just, always use the latest patch. It it won't cause any backwards compatibility issues almost for certain.

Almost for certain.

Alright. Let's talk about some proposals. We missed out on proposals last week because we recorded the episode, a bit too early. Mhmm. But there's 1 I really like, and I think everybody can get behind. So, you know, go FMT. Right?

Oh, yeah.

I love it. Even though you you'd slightly less prefer it to GoFump. Right?

Yeah. I I like GoFump over GoFump, but yeah.

So there's a behavior change which I really, really liked, suggested by the way by, Daniel Malti, Q lang maintainer.

And the Go fmt maintainer.

And the Go fmt maintainer.

Which means this will probably be added not only to Go fmt, but also to Go fmt.

I just wanna clarify for our listeners. There's go fmt, and then there's go FUMPT. Yep. Both of which format your Go code. The latter being, maintained by a really cool guy, and it's a bit stricter, so it's nicer. Less things to argue about. For me, it's like part of the basic package. Right? You open a new package, you set up golangciilint, you set up go fmt, you set up go test, and you're, like, you get

That's it.

So, you know, if you wanna run things like, go mod tidy or, you know, go test in ci, go lang cilint in precommit or in CI? What would you want to happen if there's an issue?

I want, I want to be notified and probably my PR fail.

Alright. That's

true. Failure if it's not quite up to to the bar.

Yeah. So the way we decided overall to implement it is if the process exits with a number that's not 0. Right? If the exit code is 1, then your pre commit hook will fail or your, like, CI pipeline will fail.

Exactly.

This is true for Go test. Right? If you're on Go test and if test fails, you get a output, like an exit code. Many other tools are like it. Go FMT isn't like that. And this proposal just got accepted to just align that behavior with a lot of other tools in the Go tool chain and also in Linux in general. So if you run go FMT minus d, it will exit, with 1 if diffs exist.

Yep. I love it.

This is a breaking change, like, in a sense, whatever. But I think Russ summed it up pretty nicely that it exists and Go does have a compatibility promise. But for tools, the the compatibility promise is not as strictly regulated. Mhmm. Which is nice because, you know, they sort of overlook that 1 and they feel free enough to fix it. If you have a script that breaks, it's very easy to fix it. Right? You just add pipe pipe, true or remove the minus d flag, and you're good.

Yep. I'm I'm a fan of this 1.

And it got accepted. I believe it's also very easy to implement. I don't know if there's a branch already, but seems like an easy 1 to implement.

And this proposal was 1 that was, actually brought up on the Cup of Goat channel on Slack. Dwayne Schultz did a shout out when it was only likely accept, which was just a few days ago, but now it's completely accepted. This is 1 of his pet issues, if you will, that he's been looking forward to. I know how that feels to have 1 of your pet issues finally accepted.

Yeah. Thanks, Dwayne, for, pointing it up. Alright. We have 2 other accepted, proposals to discuss. List of deprecations and newer available dependency versions. Haven't we talked about this 1? It feels like we already saw this 1.

We did. So this is actually a follow-up to a decline proposal that we talked about not too long ago, a few few weeks ago. The idea of that proposal that was declined was to emit an error or a warning message whenever you, run go get or something and you're downloading something that's not the most recent version. That was rejected as being too intrusive, maybe not Mac compatible. So this is a new proposal to add a new subcommand.

A new subcommand to the Go tool chain?

Yes.

Oh, we're piling them up. We have now Go telemetry. It's getting it's getting a little crowded in here.

So the final version of the accept proposal is to add go list, options to list deprecated or outdated versions of your dependencies. So it it won't automatically, like, throw spam in your face about XYZ version is outdated. But if you want that information, you can easily get it now through the GoToMan tool instead of having to, you know, go out to the slow, boring interwebs to look that stuff up.

I wonder, like, that sounds like a thing I would immediately integrate into tools like Dependabot or Snake or, you know, Orca shift left. Like, I would try I wouldn't I I can't see myself actively going to my project and running it, but maybe, like, some automated CI step, like filter just on major upgrades and just, like, write a comment on a poor request or of automatically file an issue. I don't know. Like, thinking back on upgrading Go packages, I don't think I've had a lot of issues upgrading packages. But I haven't really done it in projects where I didn't know all the dependencies pretty intimately.
Would you feel comfortable with a thing just opening issues for you? Hey, please upgrade this dependency. I'm asking you because you worked on, like, larger scale projects, and you were and you joined them as a contractor, like, sort of in the middle without tests. Right? Stuff like that.

So, I mean, I I actually work on a project. I've recently worked on 2 projects to do that. But what I'm doing now is is just use the dependent bot, which only, notifies us of security vulnerabilities. But I actually kinda liked, we had a workflow at a previous client that did this for all new version updates. It was kinda handy.
It wouldn't automatically merge the pull requests. It would just create the the pull request, and then you have the option to do whatever testing you want before you hit the, you know, the merge button. On the project I'm at now, I I can see myself using this tool regularly because partly because we're we're only using dependent bot, which only tells us about security updates. And also, we have like 3 or 4 dependencies that cannot be updated without major changes to our code. So we can't just sort of blindly update everything.
We have to be kind of selective and and manually vet the updates we do. For example, the new version 2, the Docker CLI library broke some things. So we're on a major version -one right now. And, you know, there's some some older things too, some old MongoDB drivers, a few other weird things that, yeah, we can't just like as a as I would like to just automatically update everything or or almost everything, we have to be selective. But I I would use this tool, I think, regularly.

I do think it's great how we kept the exact same functionality, but just making it basically a change just to the UX. Right? Instead of it doing it automatically, we put it in a tool, then it's like a la carte. If you want it, you can take it. If not, you can skip it.
It's on the menu. Right? Makes this proposal just a no brainer yes. Whereas the previous 1, which does the same thing but just in a different place is a no brainer no. I wouldn't have thought about it like a UX change for this proposal.
I do wanna point out for anybody who's listening and and didn't, you know, do these, like, major version upgrades in a big project before. That if you upgrade a major version or if you are a few major versions behind, normally, at least in my experience, trying to upgrade is a good thing. Right? You're, like, repaving your project, then you're taking care of the garden, blah blah blah. But it's also a good, chance to stop and say, hey, if I'm trying to upgrade to a new version or maybe 2, major versions up, maybe my the library I'm using is not a good fit anymore.
Yeah. A good example, not from the Go world, but I just read a blog post where, I'm sorry, listeners. Coming in, breaking news. John is drinking I have a cup. Espresso.

I have a miss My wife just brought me some

From a tiny, tiny cup.

Tiny cup.

This episode is tiny cup of go, brought to you by a couple of tiny gophers.

So anyway, what I thought about

anyway, sorry. What I thought about was, I just read a blog post from, a blog we're gonna discuss in just a second, kmcd.dev, where he has a dependency on some Hugo template. Right? That does charting. And he tried to upgrade that dependency, but ended up discovering that a sub dependency that was actually important, char.
Js, was 2 major versions behind. So, you know, dependency management is hard. It's really hard. You have interdependencies between different things. And I think just blindly looking at the list and upgrading is just not a good use of your time.
Newer versions are not necessarily better. The old versions are not necessarily abandoned. As long as you don't have a security vulnerability, you need to consider if you actually need it. What's the business value in upgrading? Because usually when you look at it, it might be better to, like, drop that dependency and start using just the 2 underlying dependencies that you actually need, or maybe you need to create a wrapper of your own.
It's like more nuanced than just number is bigger than number is better.

And can I insert a little rant here?

Of course.

1 thing I want a tool to do, and I don't know how you would do this, is I want a tool to tell me when a library has been deprecated and superseded by a fork. Because I actually had that fight me this last week. We had a a bug in a library that hadn't been made updated in 3 years. It was archived on GitHub, but there was a new fork available that somebody had made. It was just a drop in replacement and had the bug fixed.
Was a super easy upgrade, but we've been using this 3 year old library forever without even thinking about it.

That sucks, man. I I'm trying to now that you say it, it happened to me, like, a few times, and I can't believe there's no built in thing that does it. But I guess, like, how would you declare a library as, like, abandoned? There are quite a lot of libraries that I I like in Go that are totally dormant. Like, there are no issues, there are no pull requests, there's no whatever. Not because they're dead. Just not because they're abandoned, just because they're done. Right? Right. That's cool.
Like Yeah. Unlike Python or JavaScript or whatever where you always have to keep updating stuff, you can write Go code that for or Rust code, let's say, that you don't have to touch for 5 years, and it's just done. It's just good.

Yeah. Exactly.

So would you want the tool to mark repository as stale if it's still, like, all good? Just old? No. So how would you mark it? Like I don't know.

So I I suppose, you know, GitHub and maybe GitLab and some of those, services let you archive a repo. And that might be interesting to know that the repos would archive. And and that could possibly integrate into this existing tool that that we're just talking about, just to tell us, you know, this 1, there's no new version, but it's been archived. So maybe it's something to look for an alternative.

Alright. I think next to our, other meta tasks, which include, you know, trying to find that 1 guy that doesn't have his cup yet and implementing an episode serger and doing a new intro for season 2, and the auto tag, all the old stuff is 2 weeks. I'm adding create a proposal, for archived repos. Let's see if we can do it.

Alright.

If you want it to not get accepted, I can open it. But I'll I'll I'll open it. I I haven't done any any issue work in a while. That would be actually kinda cool. Cool. So we talked about, list applications and newer available dependency versions, a very simple sub command, and then we ran that about dependency management for a while because dependency management is hard. It is hard.

1 last proposal update. We talked about this already, so I won't go to the details. But, it's been accepted, the proposal to allow a mission of range variables when ranging over a function that returns 2 values. Mhmm.

May

recall we talked about this with, you know, what what if the second value is an error? Is it okay to skip over that automatically? Blah blah blah blah. The the consensus, at least as the Go team defines it, was to make it match all other range, capabilities. So you can do 4 x comma y colon equals range blah or xcolon equals range blah, which is the same as x comma blank, or you can omit all the variables entirely and just range over the number of iteration.
So it feels ergonomic to me. I think given the nuances of involved, this is probably the best option because it's the least surprising, the least, special casey. But, I could definitely see the argument for not allowing you to skip over error very values.

So I just I just don't want someone to accidentally use the not accidentally. Like, the first version of their code, they don't care about the error, so they don't iterate over it. And then when they, like, go over the code and refactor it before pushing to to a a pull request, it's not immediately obvious that you skipped the error. Right? Because it's not an underscore that's, like, ugly in your eye.
But I guess, you know, the language is should be built for both ergonomics and, like, trying to make you program as best as possible. And, you know, on 1 side of this scale, we have, you know, Python, which is, oh, it's gonna be so ergonomic and so easy, but you can write just horrible code and not even realize it. On the other side of the scale, you have, Rust, which is like, I don't care if you wanna be productive. You will fix all these, compiler errors, and you will enjoy it. And sort of, this is the tight balance that Go is trying to, you know, dance.
Both both, sides of these would be fine by me. I'm just glad it's finally decided because it's an edge case I didn't even think about when this whole range of our funk thing, was brought into, you know, into an experiment. And and you could play around with it, I think. Right? And go 123. Yeah. So play around with it and tell them what you think. We have 1 community thing to mention. This is a new blog post. How much gRPC work have you done?

That's a fair amount.

Do you like it?

There are definitely things I like about it and there are some, some annoying edge cases as well.

So if you don't know, this is a rare chance where we're not just talking about a basic Go feature. GRPC is sort of a high performance RPC, remote process call framework, which uses protobuf under the hood. You define messages, and then you can implement a server and a client that, do remote process call from 1 another. And, it's for me, it's been super useful just in my career in general. I've even given talks about how to use, like, gRPC and protobuf as a source of truth for your entire rest things and your entire API and sync everything into 1 protobuf file, etcetera, etcetera.
This blog post from I'm I'm just gonna say it, the kmcd.dev, which is Kevin McDonald, a software engineer living in Copenhagen, A super nice blog. I just love finding these Hugo gems, with really nice art and super well learned and even a meme is about why gRPC is bad, like, the bad parts.

I wouldn't say it's why it's bad, but it talks about some bad parts of it. Yeah.

Yeah. Which is interesting because gRPC has, you know, approaches a decade of usage. It's not a new technology anymore. I think about it as, like, cutting edge thing from Google. But at this point, it really shouldn't be. Right? Many people don't get into it. Many people have a hard time with it. And I think Kevin here touches really interesting points why. He talks about the learning curve, talks about compatibility with the web.
Right? It's very hard to convince your front end team to start using a binary format, if you wanna stream uploading a file, you there's no easy solution to do that. The community is not it's you need to find it. It's not as obvious to find the community. And the tooling, out of the box tooling is horrible.
The reason being protobuf, you know, in Google, you have a monorepo. All developers have the same scripts in the monorepo to, like, compile protobuf to check protobuf, whatever. But the moment you're not a Google employee, you have to start hacking a script that downloads and the relevant files from GitHub somewhere and stores them locally, whatever. Unless you use bun, which obviously the the author here highlights. But, you know, there there is undeniable success for gRPC.
There is a few things if you basically, you should read this if you want to implement gRPC in your company and you wanna know ahead of time what sort of hardships you're gonna face. So a really good blog with a ton of other interesting blog posts. This is just the newest 1. You know, a lot of blog posts about gRPC, about connect RPC, about Hugo. So shout out to the entire blog and this blog post in particular. I like gRPC. I wish it was better.

I like the closing here where it says it can be and is better, and then it offers some kind of ways to overcome some of the shortcomings.

Yeah. Again, it's you could use it as a grocery list of, hey, I wanna implement gRPC, and I'm already sort of, like, preparing for a debate. I already know what's gonna be hard in in my company, so I'm gonna prepare for it. Like, the learning curve is hard, so I'm gonna do a small workshop instead of just sending people the the documentation because the documentation is kinda rough. Rough.
The message sizes are gonna be a problem for my company, so I'm gonna write my own, like, library in the language that we use for dealing with, like, chunking and streaming files with gRPC specifically so you could reuse it. These sort of tiny things that'll probably take you, like, a few days to a week can really increase your chances of adopting, gRPC and protobox correctly in your company.

Awesome.

Which I'm definitely down for because I don't wanna spend any more time in my life debugging, random JSON schemaless data. So it's 2024, folks. Let's stop it. Alright.

I think that's a show. Let's, that's a wrap. Hop over to our wrap up. We don't have an interview today, but we'll have a little bit of banter after the show.

For sure. This show is sponsored by you, our beautiful, beautiful listeners, but specifically our beautiful Patreon members.

We've had

2 new, Patreon members since our last episode. Thanks a lot, Thomas Goodyear and Ranageth for joining as members. This is a hobby we do, to stay up to date on what's happening in Go and being able to use it at our jobs. But it's a pretty expensive hobby, mostly paying for editing fees, hosting fees, etcetera. So you know the drill.
So if you wanna support the show, you can support us super directly by, joining on Patreon. It's $8 a month, and we really appreciate it. Sort of makes the show proves that it's valuable and makes sure that it's viable. If you wanna reach out to us, find the link to the Patreon or maybe our store, or you can buy our Capa Go mugs or a t shirt or a hoodie. Both of which I've worn last week, finally, in a conference.
And I've gotten, like, I walked around, it was DevOps days with the Capaco hoodie, which I think looks a little bit better than the t shirt. And someone out of the blue was just like, hey, nice hoodie. I was like, hey, thanks. Are you a listener? And she was like, no. I was like, oh, so you're programming Go? And she was like, no. Let's go. I was like, oh, you just literally thought it was a nice hoodie. So I think unlike most tech wear, it it's actually just nice looking as well.

I have to share a short story then. I was at the airport, as you know, last week instead of with you at the live recording. And there was a 5 year old girl or so probably, who saw my laptop as I was going to security. I had to take my laptop out of out of the bag and everything. And she saw the the Cup of Go Brewster sticker on my laptop, and she was looking at it.
And, so since I had my bag open, I just reached in and grabbed 1 of my stickers and handed it to her. I said, would you like this? And she got real shy and looked at it. And then her parent she walked away with her parents and then she was just examining that sticker so closely as she walked away. I think I think I made her day. I don't think she was a listener either, unfortunately, but may maybe in the future.

Yeah. She she walked around with, like, the rust book. Remember that scene in x men where Will Smith is like, they have to shoot the aliens in the alley and Will Smith is shooting that little girl?

Oh, yeah. Yeah.

Walking around the neighborhood with a physics handle.

The men in black, not the X Men. You said x men.

What did I say? X men? No. Will Smith wasn't in x men. Luckily, I think. Not a good fit. So anyway, if you want to, give little gifts to little children at airports as a stranger, you can buy stickers, cups, hoodies, and shirts, on our swag store. You can find all these links at cupago.dev. That is cupago.dev. You can also join our vibrant community on Slack.
It's actually gotten to the point this week where I couldn't catch up. My kid had COVID all week, so I was super busy. And, actually, even didn't mean manage to read all the communique in, our Slack channel. But it's very interesting. Hashtag good cup dash o dash go, so that's kebab case.
On the Go for Slack, which is a free, Go community. If you're if you're listening to the show, you should probably join that Slack anyway. Definitely. You wanna support the show in other ways, please leave a review on Apple Podcasts, Spotify, wherever you listen to your podcast. Maybe share the show with a friend or coworker or a co student.
We don't pay to advertise, so word-of-mouth is basically the only way the show gets spread around. Finally, last week, John and I met physically. Yay. Dude is tall, y'all. Dude is tall. I'll send a photo on our, Slack group because it's, nice. We just brainstormed some ideas on how to change and improve the show just a little bit. Mhmm. We'll probably roll these out in the next, shows. There's 1 thing we wanna do, which is an outro.
And both of us are totally out of creative juices this week, so we don't have an outro for you. But if you have any ideas for a cool outro for the show so you know where it ends, like, today we don't have an interview, so it's gonna end in, like, 10 seconds. Let us know on the Slack channel. I'm gonna write down, that thing in the in the channel as well. And I think that's it.

I think so. See you next week.

Awkwardly, are we done?

Yeah. No. I think

you're done.

I wish we had an outro to make it clear.

Yeah. So we need your we need your help to un awkward, this part of the show. See you. Bye. Cheers.