this post was submitted on 01 Sep 2023
1991 points (98.1% liked)

Programmer Humor

32568 readers
287 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 6 points 1 year ago (1 children)
if ok {
    return true
} else {
    return false
}

Why?

[โ€“] [email protected] 4 points 1 year ago

Idiomatic Go way of checking for the presence of a key in a map.