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
پوشش تست (Test Coverage) یک معیار است که نشان می‌دهد چه مقدار از کد شما توسط تست‌های واحد (Unit Tests) بررسی می‌شود. این معیار به شما می‌گوید که چه درصدی از کد شما هنگام اجرای تست‌ها اجرا شده است.

به زبان ساده:

- پوشش تست بالا به این معنی است که بخش زیادی از کد شما تست شده و این احتمال بروز باگ‌ها را کاهش می‌دهد.
- پوشش تست پایین به این معنی است که فقط بخش کوچکی از کد تست شده و این باعث افزایش خطر وجود باگ‌های کشف‌نشده می‌شود.

با این حال، ۱۰۰٪ پوشش تست همیشه به این معنی نیست که کد شما بدون مشکل است، اما نشانه خوبی است که بیشتر بخش‌های کد شما بررسی شده‌اند.

آستانه مناسب بودن پوشش تست معمولاً به شرایط و پروژه بستگی دارد.

اما به‌طور کلی ۷۰٪ تا ۸۰٪: اغلب به عنوان یک آستانه مناسب در نظر گرفته می‌شود. در این سطح، بخش بزرگی از کد شما تست شده است و احتمال وجود باگ‌های پنهان کاهش می‌یابد.

بالای ۸۰٪: این سطح پوشش معمولاً برای پروژه‌هایی با اهمیت بالا و کدهای حساس توصیه می‌شود. با این حال، رسیدن به ۱۰۰٪ پوشش همیشه ضروری نیست و در برخی موارد حتی ممکن است عملی نباشد.به خاطر داشته باشید که کیفیت تست‌ها نیز مهم است. حتی اگر پوشش تست بالا باشد، اگر تست‌ها به‌درستی طراحی نشده باشند، ممکن است همچنان باگ‌های مهمی در کد وجود داشته باشد.

نحوه تست پوشش در گولنگ:

go test ./... -cover


☄️ @GoInsights | @GolangEngineers
New unique package

The standard library of Go 1.23 now includes the new unique package. The purpose behind this package is to enable the canonicalization of comparable values. In other words, this package lets you deduplicate values so that they point to a single, canonical, unique copy, while efficiently managing the canonical copies under the hood. You might be familiar with this concept already, called “interning”. Let’s dive in to see how it works, and why it’s useful.

https://go.dev/blog/unique


☄️ @GoInsights | @GolangEngineers
3
🎊 Go 1.23.1 and 1.22.7 are released!

🔐 Security: Includes security fixes for encoding/gob, go/build/constraint, and go/parser

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

📦 Download: go.dev/dl/#go1.23.1


@GoInsights | @GolangEngineers
4
در زیر یک cheatsheet خوب درخصوص authentication هستش و نکات خوبی برای پیاده سازی بخش user management ارائه داده که با رعایت موارد گفته شده امنیت سرویس خود را بهبود دهید.

https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html


@GoInsights | @GolangEngineers
Happy programmer day!!


@GoInsights | @GolangEngineers
632
آقا SSR با گولنگ را دریابید 😍😍

https://gtmetrix.com/reports/pacviewer.com/aAS0UYiE/


@GoInsights | @GolangEngineers
9111
Go Developer Survey - September 2024


Hello! The Go Team wants to learn about your experiences working with Go. We'll use your feedback to improve existing tools and prioritize new features, with the goal of building a better experience for all Go developers. Once this survey has closed, we will publicly share de-identified and aggregated results with the Go community.

https://google.qualtrics.com/jfe/form/SV_ei0CDV2K9qQIsp8?s=b


@GoInsights | @GolangEngineers
حق 🥹👌

مورخ کامپیوتر، پاول ای. سروزی بعد از مرگ ریچی گفت: «ریچی زیر رادار بود. نامش اصلاً یک نام خانوادگی صرف نبود، اما … اگر میکروسکوپ می‌داشتید و می‌توانستید درون یک کامپیوتر را نگاه کنید، می‌توانستید کارش را در همه جای داخل آن ببینید.»


@GoInsights | @GolangEngineers
10321
What's in an (Alias) Name?

Robert Griesemer
17 September 2024

This post is about generic alias types, what they are, and why we need them.

https://go.dev/blog/alias-names


@GoInsights | @GolangEngineers
3
A Crash Course on Microservices Design Patterns.pdf
3.8 MB
A Crash Course on Microservices Design Patterns

#bytebytego #tips #pro_guide

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

#fun

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