Gopher Academy
3.33K subscribers
914 photos
40 videos
279 files
1.95K links
🕸 Gopher Academy

🔷interview golang
https://github.com/mrbardia72/Go-Interview-Questions-And-Answers

حمایت مالی:
https://www.coffeete.ir/mrbardia72

ادمین:
@mrbardia72

ادمین تبلیغات:
@labdon_ads
Download Telegram
2👍1🎉1
📥 دریافت شده از:
Mostafa Solati

توی پست قبلی #ریفکتور_تایم کدی رو باهم دیدیم که نیاز به ریفکتور داشت، ممکنه اولین راهی که به ذهن برسه اینه که کاراکترهایی که میخوایم حذف کنیم رو داخل یه اسلایس قرار بدیم و از توی متن حذف کنیم. این راه حل یه مشکل داره و اونم اینه که پترن ما میگه احتمالا کاراکتر های دیگه ای به متن اضافه خواهد شد مثلا / یا % و ...
و با هر تغییر باید کدمون رو دست بزنیم و این خلاف اصول مهندسی نرم افزاره و خطا رو زیاد میکنه.
راه بعدی که ممکنه به ذهن برسه استفاده از رجکس هست، اما مشکلاتی که رجکس داره اینه که به شدت کنده (حدودا ۴۰ برابر کندتر از راه حل زیر) و همینطور به زبون آدمیزاد نیست! هم خوندن و هم نوشتنش سخته.
اما راه بهتر رو استاندارد لایبرری در اختیار ما قرار داده و اون استفاده از فانکشن FieldsFunc از پکیج strings و فانکشن IsLetter از پکیج unicode هستش

🔰 @gopher_academy
5👍3🎉1
🍷 Go Lang 1.19: Refines Generics and Memory Model

🐊 https://coderoasis.com/go-lang-1-19-released/


🔰 @gopher_academy
🙏3👍1🎉1
🥰2👍1
📡 Nil is not nil

⁉️ https://yourbasic.org/golang/gotcha-why-nil-error-not-equal-nil/


🔰 @gopher_academy
🔥2👍1
⁉️Type Assertions vs Type Conversions in Golang

📡 https://www.sohamkamani.com/golang/type-assertions-vs-type-conversions/


🔰 @gopher_academy
👍4🔥2
۲۰ تا از محبوب‌ترین درس‌های لینکدین تا ۳۱ اگوست ( تا ۳ هفته دیگه) رایگان شدند. بشتابید.

#linkedin #course #free #popular #2022 #limited #time


https://www.linkedin.com/business/learning/blog/top-skills-and-courses/the-most-popular-linkedin-learning-courses


🔰 @gopher_academy
🔥3👍1
Do not store Contexts inside a struct type; instead, pass a Context explicitly to each function that needs it. The Context should be the first parameter, typically named ctx

#dave_cheney

🔰 @gopher_academy
👍8
Poor naming is symptomatic of poor design.

#dave_cheney


🔰 @gopher_academy
👏4👍1
💥امکان اضافه کردن لینک و لیست به داکیومنت گولنگ نسخه ۱.۱۹ اضافه شد.

https://go.dev/doc/comment

نمونه داکیومنت:
https://github.com/maxatome/go-testdeep/blob/master/td/doc.go


🔰 @gopher_academy
👏21👍1🎉1
🌞🌞توی این ریپو یه سری نمونه سوالات استخدامی هست
اگه دوستان تجربه ای داشتن
خوشحال میشم که در اختیار سایر دوستان هم بزارن
سپاس 🌞🌞

https://github.com/mrbardia72/Go-Interview-Questions-And-Answers


🔰 @gopher_academy
👍6
🌞🌞🌞🌞
اینم یکی از دوستان گذاشته بود
نمونه سوالات استخدامی
که جالب بود
گفتم به اشتراک بزارم و دوستان استفاده کنن
https://github.com/alikarimii/interview


🔰 @gopher_academy
👍6
🔵Mutable data type in Golang

🔴The mutable data type is a data type that can be modified without reallocating any chunk of the memory assigned at the time of initialization. In simple words, a variable is mutable if its value can be altered without reallocating itself to a new memory space.

In golang there are a few mutable data types

🔻Slice
🔻Array
🔻Map
🔻Channels


🔵Immutable data type in Golang

🔴The immutable data type is a data type that cannot be modified without allocating new memory. So, the immutable data type has to reallocate memory for making changes to the value of a variable. This might be a downside if the variable is holding a large set of values, it will require a lot of memory re-allocation for a slight change in the value.

🔻Boolean, Int, Float
🔻Pointers
🔻String
🔻Interfaces


🔰 @gopher_academy
👍6
📡The Channel Closing Principle

One general principle of using Go channels is don't close a channel from the
receiver side and don't close a channel if the channel has multiple concurrent
senders.

#go101

🔰 @gopher_academy
👍5

🔰 @gopher_academy
👍7
Why is concurrency Hard?

Race Conditions
Atomicity
Memory Access Synchronization
Deadlock
Livelocks
Starvation


🔰 @gopher_academy
👍6👏2
یه بازی باحال که توش میتونید با زبان برنامه‌نویسی مورد علاقه‌تون با یه حریف مسابقه بدید سر یک سوال برنامه‌نویسی. هر کی سریعتر جواب درست رو بنویسه برنده است

https://codebattle.hexlet.io


🔰 @gopher_academy
🤩6👍1
📣 شرکت target-energysolutions استخدام می‌کند:

🔸استخدام Golang Job Description
🔹تمام‌وقت 🔹جوان (Junior) 🔹امکان دورکاری

🔗 https://quera.org/r/NMTI2F

🔰 @gopher_academy
🎉3👍2