
This show is supported by you, our listener. Stick around till after the news to learn more about that. This is Cup of Go for 06/27/2025. Keep up to date with the important happenings in the Go community in about fifteen minutes per week. I'm Jonathan Hall.

And I'm Jeremy Foran.

Hi hi, Sha wait. You're not shy.

No. No. Tell me who you are. Are you an impostor? I'm somebody who's delighted to be here. My name is Jeremy Forne. I work for Blue Flag Consulting, and I'm the Elasticsearch community organizer in Toronto. Wow. And a and a big Go fan.

I can see that from your outfit. Unfortunately, this is an audio only format, but Jeremy's wearing a is it a hoodie? What is that? I don't know. I see several Gophers on there, different colors. It looks like a racing outfit or something.

Sure. It's pretty sweet. So when they have the Gopher Con, one of the hosts of Gopher Con was wearing the brightest, most obnoxious Golang sweater I've ever seen. I was like, how do I get one? And it turns out they're for professional gamers.

Okay. And then

it's just branded. So this is why it's so attractive.

So let's talk about some Go news. First up, we have InGroc's Go SDK version two is out. I'm trying to grok what Ingrok is. Have you actually done any research on this? Have you read this or watched a video or anything that would make you more knowledgeable than me?

I have watched the video, the intro. Yeah. Which is a quick demo of how to instrument your GoCode and get up and running with ngrok quickly.

Okay.

And it seems quite impressive.

Nice. So instrumenting GoCode, does this give you like stats about like how much memory you're using or something or what what kind of what kind of stuff?

I have used the wrong term.

Okay.

And that's apparent. I guess implementing inside your code. So dropping in their SDK.

Yeah. Okay.

And then what it allows you to do is easily make your application publicly available.

Got it.

So let's say you're running a local web server and then you wanted to share that with a friend instead of maybe poking holes in your firewall or having them VPN onto your network, you just add their code and then it you can send them a public URL which they can then hit and their service sort of tunnels that connection back to your Go application.

That's pretty handy. I've touched on using ngrok before. I never set it up. I just followed some instructions and it did basically what you described. It let us, you know, share stuff behind behind that networks with each other. So, yeah, that's pretty cool.

Yeah. I actually have an application where I'm using a Raspberry Pi with an LTE connection. And if I wanna go in and make configuration changes, this seems like a really great way of being able to call this public endpoint without necessarily knowing what is the IP that, you know, it has. Right?

Right. Right. Cool. Well, I think the big news for the week, at least from my perspective, because we've talked about this before, Shay and I have talked about it, about its absence, is the Go 1.25 interactive release notes. They're now here. They are no longer absent. I'm excited about this because Shy apparently only reads this, doesn't read the official release notes.

He doesn't want any spoilers.

I'm curious, have you seen these interactive release notes before?

I've heard you guys talk about them on the podcast. This is the first time I've actually have dived in and this is really great documentation.

Yeah. So essentially, if you're new to the concept, you haven't heard us rave about it before, Basically it takes the changes in the Go language and the Go Center library in particular and gives you like executable examples in the browser. So you can read through the documentation and execute the change and then like change the change in your browser. You can like, oh, that's kind of cool. But what if I change the value to 6,000 or something?
You know, you can try these sorts of things in the browser and play with it. So it's a really easy low barrier to entry way to play with the new features in Go 125.

And I really like how they're exemplified very quickly. So it's like, oh, this feature and it's maybe a page or half a page. So it's really easy to consume and understand the differences.

Yeah. It's really great for some of the more esoteric features like like the synthetic time for testing. Like, I hear that phrase in my and it sounds my eyes just sort of glaze over. Like, it sounds really complicated and like maybe useful, but do I really have time to spend three weeks learning how to use this feature? Oh, here's the feature in like six lines of code. That's really easy. So I I really like that.

I understand why Shy might hold out for this.

Right? Yes. Right. So is there any feature in in the upcoming 1.25 that is, I don't know, maybe most interesting to you or that you're looking forward to or maybe scared of?

Oh, I don't know if I've been scared of any I think the only feature I was scared of originally was generics.

Oh, yeah. Me too.

You know, with all the talk and so it was okay. But or actually, I'm scared whenever people talk about changing error handling. It's like it's it's fine. It's been put to bed. Yeah. But there's a lot of it seems to be a lot of talk about the Jason v two stuff. The the changes to the sync and weight group.

Yes.

Yeah. So a lot of a few things there. That's the stuff that sort of jumped out to me the most.

Yeah. I'm I'm pretty excited about the weight group change. They're they're they're minor changes. Essentially, they're adding a a go method on a weight group. So in the past, you would have to call w g dot add. And then when you're done with executing something, wg. Done, usually in a defer within your go routine. Now you can just call wg. Go and then pass it a function. So it's more like the error group if you've ever used that, which is not part of the standard library.
It's sort of the pseudo standard library. It's in the X namespace, but I use it a lot. But if you don't need the error part of error group, this makes it more similar and easier, less error prone. So I'm really excited about that.

And it looks cleaner, like you're just removing some boiler plates. Absolutely. It's nice.

Yeah. It's a little bit surprising, I suppose, that it kind of took so long to get something so simple into the language. But on the other hand, that's a good yeah, I say this on the show before, I think it's good that Go is slow to adopt changes because we end up with fewer unnecessary changes that way.

It's the measure twice cut once approach, which Exactly. Yeah. What about the flight recorder? The flight recordings, have you, played with this at all?

I have not. Have you?

I haven't, but this always feels like one of those features where I'm happy to know that if I need to dive in and get my hands dirty, figuring out, you know, maybe what my applications are doing, it's it's there. Yeah. It's included.

I remember reading about it when it was first accepted. The proposal was accepted, I think. And it sounded real this is another one of those things that sounds really useful, but I don't know if I want to take the six weeks to learn how to use the feature. But then again, you know, here it is in in black and white in a in a page of code. So it's it's clearly not as complicated as maybe it sounds.

Okay. What's next? I don't know. Have you looked at the reflection reflective type assertions? No. I don't really do a lot of stuff with, reflections very often. I I sort of stay away.

Yeah. Yeah. I I might be a vampire. I don't like to see my reflection.

I was planning on being the one making the jokes. The smart guy.

Yeah. Before we started recording, Jeremy told me he feels like Al on on Tool Time, you know, the the the show within the home improvement universe. And so I haven't yet thought of something really dumb to say where you could say, no, I don't I don't think so, John.

I don't think so, John.

One of the big changes, of course, in Go one twenty five, although also not big at all because it's behind an experimental flag is JSON v two. I'm noticing that that's not really in these interactive release notes very much. Why is that?

I'm pretty sure it's because it has a dedicated blog post.

That would explain it.

Yeah. So just under the heading, it says that's why I wrote a separate post, which you can which can go to. I will probably link.

Mhmm. Yeah. We'll put it in the show notes.

Yeah. And so this goes through the many different aspects of the changes, why there's a break, some of the benefits, the new options and why you might be interested in starting to play with V2 and migrating your code.

Yeah. How much have you done with the JSON encoding specifically in Go?

Well, Jonathan, not very much. Typically when I'm consuming, I am one who leans towards YAML. So if I have the option, I typically will write configs in YAML and things to that effect. So unless I'm doing some web stuff and APIs.

Yeah, cool. I've done quite a bit with JSON and Go largely because I wrote what I, as far as I know, is the most popular and probably the only currently maintained client library for CouchDB in Go. CouchDB is it's like Mongo, but instead of using BSON, which is their sort of binary format, it uses JSON. So there's a lot of JSON encoding and decoding in that library.

So who sends you the swag? Is it GitHub for having the most popular library? Is it CouchDB?

So, well, certainly not GitHub. I mean, I say the most popular. Let me explain exactly how popular the most popular is. I have 323 stars. So this is a niche popularity.

I'm sure for those stars though, those people who use it, love it. Right?

I think so. I've gotten so I've actually been hired because of this library. I was hired by somebody using library to help them with their code. So yeah, that's my swag, I guess. I got some money.

There's probably a good lesson there in that, you know, the benefits of sharing your code and making it available and sometimes these opportunities arise, right, as a result.

Yeah. I suppose that's a good point to mention something else too, largely from the experience of doing this library and learning about JSON. I started to write a book several years ago called Data Serialization in Go, which is mostly about JSON, although my intention was to add other things to it, YAML and XML and so on. I put it up on Lingpub for 9.99. As of Go 1.25, the examples are essentially obsolete.
So I'm just going to give that book away for free now if anybody's interested. The concepts are still mostly valid. I'll have a link in the show notes or you could go to leanpub.com/dataserializationgolang and you can download the book for free there. You can pay if you want. I don't expect you to.
It's not very complete, but I've gotten good comments on the content that is there. So if you're interested in learning more about JSON serialization, particularly the old version, check out that free resource.

Okay. Let me Can I ask you a question?

Absolutely.

Is the book you wrote, was that based on your learnings of writing the CouchDB?

Mostly. Yeah. Yeah. Mostly.

Were there particular things you had to tackle there that you were like, man, I wish this was somebody wrote about this.

So yeah. So there were a few things. I've actually done a couple presentations at local Go meetups on some of the topics too. And actually, come to think of it, I think I have a YouTube video that goes over, like, highlights from that. So I'll put a link to that in the show notes as well.
But there's certain things well, so first off, the biggest complaint I had was how inefficient the old JSON Marshall and Marshall are is. Especially when with CouchDB, you might be working with megabyte or even gigabyte documents. And the way that by default, the way the Go serializer works for JSON is it reads all that into memory, then starts parsing it, which is obviously not what you want for something like that. I don't want to have to wait for my network to read in a one gigabyte document and then parse it, discover there's an error or whatever. And then, yeah, whatever.
So the new version, V2 handles a lot of that much better. You can start parsing as you're reading it off the network. So I did a lot of hacks to make it more efficient, you know, to break out of sort of the intended use of the martial arts so that I had some efficiency gains. And then other things were like trying to partially read. So like a common thing I needed to do was fetch a single key out of a large document, but I don't want to read the entire document for that either.
I just want to read till I find that key and then stop reading. So I had to do some custom work to to make that sort of thing possible too.

Interesting. Interesting. And so this JSON v two, you can tackle a lot of those issues just by switching over to the this new version.

Yep. Yep. Exactly.

Okay, so I think you touched on a few things. One of them being the streaming. Being able to stream the documents into memory, read them. This gives you the benefit of back pressure sensitivity. So if you're not ready for more information, you don't need to flush. When you are, you can. Mhmm. Another is the amount of tags. So you can control much more control over how you're parsing that JSON. The I think they give you some options in terms of what to do when you have unexpected fields

Yes.

Which is always nice. I know I've run into that in the past where it's like, why is everything empty? Yeah. Oh, because it got a field it wasn't expecting. Was there any of those that stood out for you?

So the within CouchDB, that one particularly doesn't matter. So I suppose there's certain things where I expect a certain subset of fields to exist, but beyond that, like it's I don't care. So I suppose that's another very common example is, you know, I expect an ID field and a revision field and maybe a couple of others and I need to fetch those out. The rest of it is user payload and I want to handle that in a different way. So yeah, I don't know if the way JSON V2 handles unexpected fields will directly apply to that particular situation, but there's a good chance that it will be easier than it was with JSON v one.

Yeah. I guess more control. Having more knobs and dials to adjust always is helpful.

Yeah. Exactly. Yeah. So basically, I don't know exactly how this is going to improve my CouchDB library in all aspects, but I'm a 100% certain that it will improve performance in all cases.

I don't think so, John. If you go through the oh, that was so natural. No one saw that one coming. But that's you bring up a great point, right? Which is that in some situations it performs the v two library performs better.
In some, it might not perform as well in in, I think, very few cases. Mhmm. So you might wanna understand how it stacks up and in particular to your your use case. So over at github go-json.-experiment, there's a repository, JSONBench, and they've gone through the trouble of testing out various use cases across the V1 library, V2 library, and then a few other sort of common libraries that are used. And you can, you know, check it out.
They have a lot of great graphs and visualization so that you can get a sense of how your use case might perform. And then, you know, before you want to go kick the tires and try testing on your side.

Awesome. So I need to go check out these benchmarks before I just assume that everything is better for my JSON.

I think for most people, it'll be good upgrade, right? For most people, it'll just be like a speed up of 20% probably. And then in certain situations, even better.

Yep. Awesome. Cool. Well, I think that wraps us up for the news for this week, but we do have a lightning round, so stick around for that. Thanks for listening to Cup of Go. We are a listener supported show. We did sponsorships for a while. We haven't done that for a long time. We decided to try to make it listener supported. And so far, our listeners have been doing a great job.
I think we have Patreon's covering about half of our monthly expenses right now, maybe a little bit more. So that's great. We're not in danger of stopping. We all enjoy doing this, even if we have to pay for the hobby, but your financial support helps. What helps even more than your financial support though is word-of-mouth.
Would you share the show with a friend, with a colleague, with a fellow student? Let them know our listenership has been going up steadily. We really love that. We like educating the Go community. We like learning about Go and we love having guest co hosts when others can't come. So glad you're here, Jeremy.

It's a real treat for me. Great.

If you want to learn more about the show, the main place is cupago.dev. That's our website. There you can find links to all past episodes. You can find pictures of us. I assume we'll have a picture of Jeremy before too long, but probably before the show is even out.
So you could go there right now and see Jeremy. You can also email us at newscupago. Dev that goes to me and then I try to share with my co hosts. You can also probably actually where all the actions happening is on Slack in the Cup O Go Kebab Case channel on the Gopher Slack.

So I actually just joined the Cup O Go Slack channel, you know, in preparation for this and and I'm scrolling up and there's so much great content there. A lot of great conversations happening, people pointing out interesting stuff. So it feels like if you wanna keep your finger on the pulse, that's a really good place.

It is a good place. And you can ask questions there. Mostly it's people sharing like links to articles about Go stuff, but people ask questions too. Like, hey, I'm trying to solve this problem at work. What's the best way to do it? We've never had to police the channel. I suppose if somebody starts spamming, we will have to, but it's never been a problem so far. There's five seventy people on the channel right now, so come be number five seventy one.

Is it true the person who becomes a thousandth, you know, the one thousandth person gets the free mug?

I think that might be I

think it is now.

Thanks Jeremy for sponsoring that one thousandth mug.

It'll be funny because you'll see the stats where it's hovering around like nine ninety eight for a little bit. Right? Like, people just waiting to

The problem is when, like, once it hits a thousand and people start leaving and rejoining again, so we have like 700 thousands. That would be a problem. Oh, that's funny. You can also leave a review for the show on Spotify or Apple Pod Is it Apple Podcasts now? I can't remember. They changed their name the time. This week, I think it's Apple Podcasts. Wherever you listen to your podcast, leave a review, leave a rating. I think that's about it. Did I forget anything about You can also buy swag.
We have mugs and t shirts and stuff. Not as cool as the one Jeremy's wearing today, but we do have some

t shirts. I'll post a link to the sweater.

That'd be awesome.

Yeah. So I think that takes us to the lightning round.

I think it does. Let's do it. Lightning round. Okay.

I'm excited, to talk about charm.io, has added a new tool to their already very charming set of libraries. It's called Fang. And Fang is a drop in sort of augmentation to Cobra. So if you're using the Cobra CLI library, then you can import Fang, you know, replace the call that invokes the Cobra CLI root command. And now all of your commands look very pretty, very attractive, some really nice color scheme.
So it's one of those things where it takes two minutes and then you get the benefit of a much more professional looking sort of CLI interface.

Interesting. Does it require Cobra?

Yeah. Yeah. So you actually build out your Cobra however you would, however complex, and then you just drop the root command into their method.

I like the concept. I'm disappointed that it requires Cobra because although I definitely have used Cobra, I feel like it was mostly created before anybody knew Idiabetic Go. Anybody, I'm not pointing at the author, like anybody, nobody knew Idiomatic Go yet. We've learned a lot since then. And I feel like there are better libraries now, but I wish it would plug into one of those too. Maybe it'll be enough to convince me to go back to Cobra.

Or maybe if you drop into the Charms Discord channel make some requests, guys are they're really responsive, really engaging. They have a really great community.

Nice. That's awesome. I wanna talk about Copilot.

I've never heard of Copilot.

Never heard of Copilot.

As a developer, I've never is Fight Software?

Have you heard of GitHub?

Sure. I've come across it once or twice.

So GitHub, Microsoft, Copilot, they all sort of go together now these days since they're all owned by the same company. But I have a link here too. It's just a YouTube short. It's really short, like less than a minute long. But they mentioned that the Copilot API now is written in Go. So although GitHub is mostly a Ruby monolith, etcetera, etcetera, if you're using Copilot, behind the scenes, you're using Go and you probably didn't even realize it.

I love to see that stuff. And then I know you guys have talked about it on the show before how TightScript is using Go now for for I think it's compiling. And so you're seeing these sort of backend tools sort of migrate towards Go or backend services, I think it's great.

Yep. And one more thing. Tip tips?

Typist. Typist. Oh, okay. So this is this is not necessarily Go. This is a tool to maybe add to the tool belt.
I've become obsessed with it. It's documentation as code. So anyone who's familiar with LaTeX, it gives you the ability to sort of separate your content from your layout a lot like HTML and CSS. But it produces PDF, PNGs, that kind of And then the advantage is that it's, I'm pretty sure, Turing complete. So you can go in and write your documents and then your documents can be formatted with code you write, so repeats and that kind of stuff.
And this allows you to create a theme for your document as code and then just focus on the content. So you're not like trying to find, you know, a bad return or something like that. It's almost like writing markdown. As simple as writing markdown, but you get the full control of making the document look however you like. You can pass it variables from the command line, all kinds of stuff. I'm I'm anyone who knows me knows I've become obsessed with typist.

Awesome. Not sponsored, but a cool tool.

Not sponsored, but it's an up and coming. If you're writing a user manual, for example, for, you know, maybe how to use your software or something like that, it's a pretty good fit and it's worth checking out.

Awesome. Well, I think that's a wrap. Do you have five minutes to stick around Jeremy and talk about you a little bit more? Sure. For those who are interested?

Yeah. All right. I'd be happy to. What just just general?

Just let's let's start with how do you use Go?

How do I use Go? Okay. Well, I guess I I started in a bunch of different languages. Mhmm. And, you know, c plus plus. And then at some point, I came to Python because it's like, oh, I can get things done a lot quicker. And the problem with Python was it was like, okay, I got this working, but how do I keep this thing running? Right? And I started to play around with Go. Rob Pike's introduction of the language, you know, the talk he gave, I think it was in 02/2012.
It might have been. No. It might have been before that. I think maybe even 02/2009. We'll we'll fix that in post.
But the he was hitting all of the points, all of the issues that I was becoming irritated with Python for. Right? And so I started playing with it and then it was, I would write my sort of like proof of concepts or instrumenting an API in Python and then slowly port to go. And then it just became more and more, I just started making projects in go and getting up and running quicker and just absolutely love Golang. I know that anytime I open up a project, I'll hit compile, it'll compile.
And anyone who's done some Python, you know, you send it from your Mac to a Linux machine and it's like, okay, I gotta do this. I gotta do that. It's the packaging is a nightmare. Cool.

And you also said you're the community manager for Elastic. Explain what that means and does that relate to Go at all or is that just sort of a side quest? Sure.

Well, if you're in software development long enough, you know, you're going to have to persist information And that's a whole another field. Right? So relational, non relational, horizontally scaling, vertically scaling. There's all these different concepts. And around 2015, I was doing providing a public Wi Fi service in Toronto.
So if you use the subway, you would connect to T Connect. We had hundreds of thousands of people using the Wi Fi every day. So there was a lot of information and logs to collect. And I started using the stack back then it was Logstash was separate, Cabana was sort of separate and then you had Elasticsearch and they eventually evolved into the Elastic Stack. But at the time it was sort of the first database that you could get up and running and it would scale to sort of any size you need.
It was easy to work with. You know, I didn't have to spend a lot of time planning, you know, my table designs and all that kind of stuff. It was really easy to hit the ground running and I really enjoyed it and it became one of my go to sort of databases. So I just try to stay a part of the community, support people. And I think if you have a good working knowledge of Elasticsearch, there's a lot of problems, diverse problems that you can solve.
It's very easy to start doing things like dash boarding or anomaly detection and support the community. And how I talk to Elastic is usually through a Go application.

Okay, awesome. You mentioned at the beginning that you do consulting. Are you an independent or you work for an agency?

No, independent.

Okay.

Yeah. I'm sorry, go ahead.

Plug your service. Tell us what you and who should contact you if they need some of your help.

Sure. So we have a So it's myself and another gentleman, Yousef Chalouis, And we just really enjoy solving tough problems, complex problems. And so we try to find new and interesting challenges that companies have that will sort of force us to take on to expand our sort of knowledge, either by learning their business, which might be new to us or implementing a new maybe design pattern or some sort of platform type engagement. And that's been really enjoyable. And that's really what we've been trying to focus on.
And I think for our customers, that result really shows because it's not just we're in trying to book a contract or something like that. We intimately wanna know how to solve your problem. So we wanna understand your business, what drives it, what are the challenges so that the software we write is an elegant solution to that. So that's really what we get excited about when people talk, Oh, one's a hairy one. You know, there's this department and they don't like it this way.
And then this is antiquated and all that kind of stuff. The more they try to convince us that it's too challenging to solve, the more excited we get.

So Yeah. Yeah. Cool. And if anybody is looking for some help or just interested in reaching out, how can they contact you?

Can shoot me an email. My name, [email protected]. We have our website and I'm sure you can hit me in the Cup of Go channel on Slack.

One last question before we wrap this up. And you you know the question because you're a listener to the show. Sure. Who has been most influential to you in your journey with Go?

Has to be Rob Pike. Yeah. Now I don't know him personally. I'm I could get a call any day, maybe even after this. I would assume he's a listener.

Of course.

Yeah. Yeah. Hi, Rob. Rob yeah. Rob, yeah, first round's on me here in Toronto. Right? But, yeah, I've actually gone back and watched his talk about Go introducing it multiple times. I just find it really rich with the knowledge of somebody who's been building software and building it well for for decades and decades. So I you know, that's sort of what I aspire to. And so that's Awesome. That's who's been the biggest influence.

Cool. I I think I would agree. I I he would he would certainly be in my top three, if if not the top one. So well, anyway, Jeremy, thanks so much for filling in for Shy while he's gone. It's been a pleasure meeting you.

The pleasure has been all mine.

Alright. We will see you all next week. Program exited. Programme exited. Goodbye.