Golang Insights – Telegram
Golang Insights
760 subscribers
116 photos
7 videos
47 files
131 links
Stay ahead in Golang development with Golang Insights, your go-to for the latest news, tips, tricks, and code examples tailored for Golang enthusiasts and professionals.

Group: https://news.1rj.ru/str/GolangEngineers
Download Telegram
Speedrunning Guide_ Junior to Staff Engineer in 3 years.pdf
1.2 MB
Speedrunning Guide_ Junior to Staff Engineer in 3 years

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Golang Insights (Javad)
🚀 پکیج algo مجموعه‌ای از الگوریتم‌های پرفورمنس بالا و بهینه

سعی کردم در این پکیج یکسری الگوریتم های خاص بصورت بهینه و با بدون وابستگی به dependency های خارجی قرار دهم و فعلا یک الگوریتم را توسعه دادم و بزودی برخی الگوریتم های دیگر نظیر Reservoir Sampling, Consistent Hashing و برخی دیگر را قرار دهم.

در حال حاضر الگوریتم زیر را تکمیل کردم و قرار دادم.

انتخاب تصادفی وزنی (Random Weighted Selection)

📌 مشاهده پکیج و مستندات:
🔗 گیت‌هاب: https://github.com/Ja7ad/algo
📚 مستندات: https://pkg.go.dev/github.com/Ja7ad/algo

🔥 خوشحال می‌شوم نظرات و پیشنهاداتتان را بشنوم! اگر علاقه‌مند به مشارکت در توسعه این پکیج هستید، PR بفرستید! 💡


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
6🔥3👍2
🎊 Go 1.24 Release Candidate 3 is released!

📄 draft note: https://tip.golang.org/doc/go1.24

🔈 Announcement: https://groups.google.com/g/golang-announce/c/vYMfuq_XO6w

📦 Download: go.dev/dl/#go1.24rc3


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
😁5
1.Corporation Specifications and Workflows.pdf
75.1 KB
فرصت شغلی برای برنامه‌نویسان ایرانی

اگر بدنبال فرصت شغلی ریموت هستید یک فرصت استثنایی برای برنامه‌نویسان ایرانی هست.

اطلاعات داخل داکیومنت پیوست شده هست.

در صورتی که مایل بودین با یوزر زیر تماس بگیرید.

@robshyver


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
Please open Telegram to view this post
VIEW IN TELEGRAM
🧨 Go 1.24.0 is released!

📝 Release notes: https://go.dev/doc/go1.24

⬇️ Download: https://go.dev/dl/#go1.24.0


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
4🔥1
بهبود عملکرد و مصرف منابع چشم گیر با Swiss Table

جدول سوییسی یک الگوریتم جدید برای ساختار map در Go 1.24 است که جایگزین هش‌تیبل قدیمی شده. این روش باعث سرعت بیشتر، مصرف حافظه کمتر و تخصیص‌های کمتر در عملیات خواندن، نوشتن و تغییر مقدار در map می‌شود.

در زیر یک بنچمارک انجام دادیم با go 1.24 و تقریبا نتیجه خیلی چشم گیر خوب بود:

hash table

cpu: AMD Ryzen 7 5700U with Radeon Graphics         
BenchmarkRead-16 100000000 11.01 ns/op 0 B/op 0 allocs/op
BenchmarkWrite-16 7 161118909 ns/op 87729269 B/op 38401 allocs/op
BenchmarkModify-16 46085539 25.85 ns/op 0 B/op 0 allocs/op
PASS
ok hash table 6.132s


swiss table
cpu: AMD Ryzen 7 5700U with Radeon Graphics         
BenchmarkRead-16 100000000 10.55 ns/op 0 B/op 0 allocs/op
BenchmarkWrite-16 7 155943380 ns/op 75513976 B/op 8198 allocs/op
BenchmarkModify-16 48564434 24.87 ns/op 0 B/op 0 allocs/op
PASS
ok swiss table 5.044s


که در جدول پیوست شده تقریبا در مجموع 17.8% نسبت به hash table سریعتر است.


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
162👍1🆒1
Clean Architecture 101_ Building Software That Lasts.pdf
2.7 MB
Clean Architecture 101_ Building Software That Lasts

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
From Monolith to Microservices_ Key Transition Patterns.pdf
2.5 MB
From Monolith to Microservices_ Key Transition Patterns

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
2
Mastering Idempotency_ Building Reliable APIs.pdf
3 MB
Mastering Idempotency_ Building Reliable APIs

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
دوستان گولنگی عزیز ماه قبل من سعی میکردم با اسپانسری GoBridge دورهمی هفتگی برگزار کنم متأسفانه فرصت نشد ادامه بدم ولی خیلی دوست دارم مجدد شروع کنیم ولی متاسفانه خیلی درگیر کارام شدم.

ولی می تونم با کمک GoBridge فضای وبینار و میتینگ تا ۱۰۰۰ نفر با امکان ضبط فراهم کنم اگر کسی مایل بود.

برای دیدن دورهمی های قدیمی داخل گروه کلمه دورهمی جستجو کنید.

برای برگزاری میتوانید با من در ارتباط باشید.

@ja7adr


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
5
Non_Functional_Requirements_The_Backbone_of_Great_Software_Part.pdf
2.9 MB
Non-Functional Requirements_ The Backbone of Great Software - Part 1

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
Please open Telegram to view this post
VIEW IN TELEGRAM
Faster Go maps with Swiss Tables

Michael Pratt
26 February 2025


The hash table is a central data structure in computer science, and it provides the implementation for the map type in many languages, including Go.

https://go.dev/blog/swisstable


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
علاقه مندان بازی Command & Conquer Generals دو روز پیش شرکت electronic arts سورس کد این بازی را بصورت کامل در گیتهاب منتشر کرده.

https://github.com/electronicarts/CnC_Generals_Zero_Hour


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍6
⚡️ اصول کامنت‌نویسی در زبان گو - بخش اول: Deprecated

یکی از اصول مهم در کامنت‌نویسی زبان Go ، استفاده از Deprecated است. این کامنت به شما کمک می‌کند که به‌صورت تدریجی بخشی از کد را منقضی کرده، حذف کنید، یا جایگزین مناسبی برای آن پیشنهاد دهید.

🔹 نحوه استفاده از کامنت Deprecated

در گولنگ، اگر بخواهید یک تابع، متد، یا یک نوع داده را Deprecated کنید، باید آن را در کامنت سند‌نویسی (doc comment) قبل از تعریف عضو موردنظر قرار دهید. گولنگ ابزار خاصی برای مدیریت موارد منقضی‌شده ندارد، اما IDEها و ابزارهایی مانند golangci-lint می‌توانند این موارد را شناسایی کرده و به کاربر هشدار دهند.

// Deprecated: از تابع NewMethod به جای این استفاده کنید.
// این تابع در نسخه‌های آینده حذف خواهد شد.
func OldMethod() {
fmt.Println("This method is deprecated")
}

// تابع جدید جایگزین
func NewMethod() {
fmt.Println("This is the new method")
}

🔹 تاثیر کامنت Deprecated در IDEها و ابزارهای آنالیز کد

اکثر محیط‌های توسعه (IDEها) مانند GoLand یا VS Code هنگام استفاده از یک تابع Deprecated ، هشدار نمایش می‌دهند تا توسعه‌دهندگان از جایگزین مناسب استفاده کنند. همچنین ابزارهای Linter مانند golangci-lint می‌توانند به‌طور خودکار این توابع را شناسایی کرده و پیشنهاد جایگزین ارائه دهند.

🔹 بهترین شیوه‌های استفاده از Deprecated در گولنگ

همیشه جایگزین مشخص کنید: اگر قصد دارید یک بخش از کد را منسوخ کنید، حتماً جایگزین آن را در توضیحات ذکر کنید.
هشدارهای لازم را در اسناد پروژه ارائه دهید: مستندات API باید نشان دهد که کدام بخش از کد Deprecated شده است.
حذف تدریجی توابع قدیمی: ابتدا با Deprecated کردن یک تابع شروع کنید و پس از چند نسخه، آن را از کد حذف کنید.

🔹 نتیجه‌گیری


استفاده از کامنت Deprecated در Go به توسعه‌دهندگان کمک می‌کند تا تغییرات را مدیریت کرده و به‌صورت تدریجی بخش‌های قدیمی را حذف کنند. این روش نه‌تنها باعث خوانایی بهتر کد می‌شود، بلکه از بروز مشکلات ناگهانی در پروژه‌های در حال توسعه جلوگیری می‌کند.


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍96🔥2
Go 1.24.1 and 1.23.7 are released!

🔐 Security: Includes a security fix for net/http (CVE-2025-22870)

🗣 Announcement: https://groups.google.com/g/golang-announce/c/4t3lzH3I0eI/m/b42ImqrBAQAJ

🗃 Download: go.dev/dl/#go1.24.1


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
14
می‌توانید Redis را بدون ذخیره‌سازی داده‌ها روی دیسک اجرا کنید.

این کار سریع‌تر است، اما به این معنی است که هیچ پشتیبان (Backup) از داده‌های خود نخواهید داشت.

اگر تصمیم بگیرید داده‌های خود را ذخیره کنید، Redis دو روش اصلی ارائه می‌دهد: RDB و AOF.

کدام یک را باید پیشنهاد کنید؟ و دليل؟


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM