Golang Insights – Telegram
Golang Insights
759 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
🥳 Go 1.23.3 and 1.22.9 are released!

📣 Announcement: https://groups.google.com/g/golang-announce/c/X5KodEJYuqI

⬇️ Download: go.dev/dl/#go1.23.3


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|
| Don't Push To Production On Friday |
|__________________|
\ (•◡•) /
\ /
——
| |
|_ |_


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
😁10
⚜️سیزدهمین دورهمی Code&Coffee در مشهد
 
اگر برنامه‌نویس هستید و عاشق کندوکاو در میان چالش‌های دنیای برنامه‌نویسان؛
شما را به یک تجربه فوق‌العاده از گفت‌وگو و شبکه‌سازی دعوت می‌کنیم.

این رویداد فرصتی عالی برای بهبود مهارت‌های برنامه‌نویسی شما، آشنایی با دیگر برنامه‌نویسان، انتقال تجربیات و گفت‌وگو درباره چالش‌های تخصصی، در کنار لذت نوشیدن قهوه است.

موضوع این دورهمی سیزدهم
هنر مهندسی نرم افزار با گولنگ:
الگوها، ابزارها و تکنیک ها
                   

تاریخ: چهارشنبه، ۲۳ آبان ماه
زمان: ۱۷:۳۰ الی ۱۹:۳۰

مکان برگزاری: دفتر داتین مشهد


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
افزونه سرچ Golang برای مرورگرها

با استفاده از این افزونه میتوانید خیلی سریع داخل داکیومنت های pkg.go.dev جستجو کنید و خیلی سریع به مطلب خاصی دسترسی پیدا کنید.

https://go.extension.sh/

برای جستجو کافیه داخل نوار آدرس مرورگر کلمه go را بزنید.




☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍32
Forwarded from Go Casts 🚀
گولنگ ۱۵ ساله شد.

سرعت رشد خوب گولنگ در فراگیر شدن چشمگیر بوده در این مدت. مخصوصا در حوزه ابزارهای cloud این قضیه خیلی بیشتر دیده میشه.

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

Go Turns 15
https://go.dev/blog/15years


@gocasts
11👍2😈1
دروهمی گولنگی امروز داتین باعث شد تو این فضای گرم با دوستان علاقه مند به گولنگ در مشهد آشنا بشم و باعث افتخار و دلم گرمی است.


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥11👍3😁1
احتمالا این اتفاق برای اکثر ماها افتاده ولی خوبه درخصوصش بقیه هم بدونن.

#ویکی_تجربه

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍19🔥2
🥳 Go 1.23.4 and 1.22.10 are released!

🗣 Announcement: https://groups.google.com/g/golang-announce/c/3DyiMkYx4Fo?pli=1

⬇️ Download: go.dev/dl/#go1.23.4


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
1
وقتی میخوای از CPU حسابی کار بکشی 😂😂


☄️ @GoInsights | @GolangEngineers
This media is not supported in your browser
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
یه مطلب خوب درخصوص ثبات یا ریجستری

https://news.1rj.ru/str/SoniaNotes/879


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
1
🎊 Go 1.24 Release Candidate 1 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.24rc1


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
1
Go Developer Survey 2024 H2 Results

Go was designed with a focus on developer experience, and we deeply value the feedback we receive through proposals, issues, and community interactions. However, these channels often represent the voices of our most experienced or engaged users, a small subset of the broader Go community.

https://go.dev/blog/survey2024-h2-results


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
5
Decorator pattern in Go

In Go (Golang), decorators are not a built-in feature as they are in some other languages like Python. However, you can achieve similar functionality using higher-order functions. A higher-order function is a function that takes one or more functions as arguments and/or returns a function.

In Go, you can create a decorator by defining a function that takes another function as an argument, wraps it in some additional behavior, and returns a new function. Here is a simple example to demonstrate this concept:

Example: Logging Decorator

Let's create a logging decorator that logs the execution time of a function.

1. Define a function type that will be decorated:

package main

import (
"fmt"
"time"
)

// Function type that takes an int and returns an int
type IntOperation func(int) int

// Sample function to be decorated
func square(n int) int {
return n * n
}


2. Create the decorator function:

// LoggingDecorator is a decorator that logs the execution time of a function
func LoggingDecorator(fn IntOperation) IntOperation {
return func(n int) int {
start := time.Now()
result := fn(n)
fmt.Printf("Execution time: %v\n", time.Since(start))
return result
}
}


3. Use the decorator:

func main() {
// Apply the LoggingDecorator to the square function
decoratedSquare := LoggingDecorator(square)

// Call the decorated function
fmt.Println("Result:", decoratedSquare(5))
}


Explanation

- IntOperation: A type alias for a function that takes an int and returns an int.
- square: A sample function that calculates the square of an integer.
- LoggingDecorator: A decorator function that takes an IntOperation function, wraps it with logging behavior, and returns a new IntOperation function.
- In the main function, we apply the LoggingDecorator to the square function and call the decorated function.

When you run this code, it will output the result of the square function and log the execution time.

Use Cases

Decorators can be useful for:
- Logging
- Caching
- Validating input
- Measuring performance
- Handling retries

By using higher-order functions, you can implement these behaviors in a reusable and modular way in Go.


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
دوستان اگه اپلیکیشن رو بصورت مونولیت مینیوسید، کار خوبی میکنید، اما aggregation pattern رو جدی بگیرید، کمک بزرگی میکنه به حفظ loosely coupled بودن ماژول و سرویس هاتون.

یه اشتباه رایجی که باعث میشه خیلی راحت همه چیز در هم تنیده و coupled بشه نیازهای بیزینسی ای هست که دیتای aggregate شده از چند domain مختلف رو میخواد از شما. تو حالت مونولیت خیلی ساده ست که شما در هر domain به دیتابیس یه domain دیگه درخواست بزنی و یا حتی تو interactor/service دیگه یه متد جدید تعریف کنی که دیتای مد نظر رو بده. که معمولا باعث در هم تنیده شدن و چاق شدن سرویس هاتون میشه.

بهتره سرویس یا همون interactorهاتون کارهای خیلی کوچیک و well-definedی رو انجام بدن و اگه نیازمندی های aggregationطور دارید، یه سری service دیگه بسازید که وابستگی خواهد داشت به سرویس های مختلف و دیتاهای raw رو میگیره و پردازش میکنه که دیتای نهایی رو آماده کنه.

بعضی وقت ها از طریق gateway هم ممکنه بتونید aggregate کنید. بعضی وقت ها ممکنه تو همون لایه دلیوری (کنترلر) تون بتونید دو تا سرویس رو فراخوانی کنید و کار رو در بیارید، گاهی هم پیچیده تر میشه و لازمه یه سرویس(interactor) بنویسید که کار aggregation رو انجام بده
https://learn.microsoft.com/en-us/azure/architecture/patterns/gateway-aggregation

باز خود aggregate کردن حالت های مختلفی داره، اینجا میتونید بیشتر بخونید در موردش
https://medium.com/geekculture/design-patterns-for-microservices-aggregation-pattern-1b8994516fa2

#gocasts | #hossein

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
شاید برای شما سؤال شده باشه که چطوری میشه توی پروژه‌های Open Source مشارکت کرد یا اینکه چطوری یک پروژه‌ای رو راه‌اندازی کنیم که تأثیرگذار باشه و مورد مشارکت قرار بگیره! این سند که توسط خود github تهیه شده به پاسخ همین سؤال هست و شامل موارد زیر میشه:

- حفظ تعادل کار و زندگی در توسعه پروژه‌های Open Source.
- چگونه در پروژه‌های Open Source مشارکت کنیم؟
- چطوری یک پروژه Open Source رو شروع کنیم؟
- چگونه کاربرهای پروژه رو پیدا کنیم؟
- نحوه ساختن گروه و هم تیمی
- بهترین الگوها برای Maintainerها
- رهبری و قانون‌گذاری در مدیریت پروژه
- جلوگیری از خارج‌شدن از مسیر اصلی پروژه و نگرش‌های غیرمتناسب سایر شرکت‌کنندگان و حفظ چهارچوب‌ها
- متریک‌ها و معیارهای قایل اندازه‌گیری پروژه
- نحوه دریافت حمایت و رسیدن به سود مالی
- جنبه حقوقی پروژه‌های Open Source


☄️ @GoInsights | @GolangEngineers

https://opensource.guide
11🆒1
یکی این عکس رو گذاشته لینکدین نوشته رفتم شرکت رهپویان‌‌ اندیشه برای پوزیشن UI/UX Designer و این سوالات رو بعنوان سوالات آزمون استخدامی گذاشتن جلوم!!

دیوونه خونه‌اس قشنگ.


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
😁11🥴62👎1
فروش رزبری پای 4 مدل B با رم ۸ گیگ

این رزبری پای اورجینال انگلستان‌ ۲-۳ ماه بیشتر استفاده نشده است و با قیمت 5.100.000 ت هرکسی خواست می تواند خریداری کند.

لوازم:
- کابل مینی به hdmi

آیدی جهت خرید: @ja7adr

اطلاعات رزبری:

https://bir-robotic.ir/product/%D8%A8%D8%B1%D8%AF-%D8%B1%D8%B2%D8%A8%D8%B1%DB%8C-%D9%BE%D8%A7%DB%8C-4-%D9%85%D8%AF%D9%84-b-%D8%A8%D8%A7-%D8%B1%D9%85-8gb/#next


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