⚠️ Update: #Iran's internet blackout is now the longest nation-scale internet shutdown on record in any country, exceeding all other comparable incidents in severity having entered its 37th consecutive day after 864 hours.
⚠️ Update: #Iran's internet blackout has now exceeded 120 hours with connectivity still flatlining around 1% of ordinary levels.
Meanwhile, an increasingly Orwellian environment is emerging as telcos threaten users who try to connect to the global internet with legal action.
I’m guessing Iranian Americans hate your guts. Like most Americans if they ever knew who you were, what you support, and the things you say. You’re an Islamist-terrorist propagandist and lapdog. My family’s been in America for 125 years. My father and grandfather and great uncle fought for this country. You are an interloper, a carpetbagger, whose entire purpose is to destroy our country from within. You are the enemy within!
پهلوی:
۱) اگه فراخوان نده => بیعرضهست، هیچکاری نمیکنه، ترسوعه و...
۲) اگه فراخوان بده و کسی نیاد => توان سازماندهی نداره، قدرت بسیج عمومی نداره، کاریزما نداره و...
۳) اگه مردم بیان و موفق شن => سوار موج انقلاب شد... خمینی دوم...
۴) اگه بیان و کشته شن => پهلوی مقصره.
BREAKING:
Zelensky says that if the regime in Iran is allowed to survive, it will only teach other dictators that if you kill enough people, you can stay in power.
💡 Golang Tip #16: Don't Return -1 or nil to Indicate Error.
In other languages, it's common practice for functions to indicate errors or missing results by returning special values like -1, null, "",...
This is called "In-band errors".
The main issue with in-band error signaling is, it requires the caller to remember to check for these special values every time.
This is... error-prone.
Also, this approach is not the best (or even good) in Go since it supports multiple return values.
Go's solution: Multiple return values
A function can return its usual result along with an additional value (error or bool) that explicitly signals whether the operation was successful.
This makes the code clearer.
Using the result without checking the success indicator (ok bool) results in a compile-time error.
And this forces us to handle the possibility of failure explicitly:
So now, your code has 3 things (you don't even need to care):
Clear separation of concerns
Which part of the return value is the actual result and which part indicates the success or failure of the operation.
Forced error handling
The Go compiler requires developers to address the possibility of an error, reducing the risk of overlooking it (so, don't ignore errors with _).
Improved readability and maintainability
The code explicitly documents itself.
#golang