this post was submitted on 07 Oct 2025
428 points (99.1% liked)

Programmer Humor

27491 readers
1495 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] four@lemmy.zip 1 points 1 month ago (2 children)

Shouldnt it be return UUID { uuid: uuid.uuid } ?

I think it would make more sense AND more uuid per UUID

[–] rikudou@lemmings.world 3 points 1 month ago (1 children)

The first UUID is a local type, the second is the name of an embedded struct, the third is the name of the variable.

The struct looks something like this (writing this on my phone)

type UUID struct { uuid.UUID }

So, basically, this is a custom wrapper for a third party UUID implementation.

[–] four@lemmy.zip 1 points 1 month ago

Ahh, that makes sense then

[–] boonhet@sopuli.xyz 1 points 1 month ago

I'm assuming it's a map/dictionary notation here, rather than a type hint