Function is changing a global variable, the global variable is checked after every call to the function. That’s your return value.

That’s… Terrible. Truly the stuff of nightmares!

deleted by creator

mfw my face when the go compiler fucking screams at me because I dared to declare a variable and not use it

@Steeve@lemmy.ca
link
fedilink
English
171Y

IF THIS IS INTENTIONAL PUT AN UNDERSCORE BEFORE THE VARIABLE NAME YOU ABSOLUTE FUCKING MORON

didn’t know the go compiler’s name was steeve

Idk, mb they expected you to modify smth passed by reference/pointer, and the compiler’s too busy to care :)

Create a post

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog