Gopher Academy
3.33K subscribers
916 photos
40 videos
279 files
1.97K links
🕸 Gopher Academy

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

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

ادمین:
@mrbardia72
Download Telegram
پروپوزال log/slog: skip caller for add source

هدف کلی از این Proposal این است زمانیکه آپشن AddSource فعال میکنید اطلاعات تابع و موقعیت رخ دادن لاگ را مانند زیر نمایش می دهد.

source=/home/javad/go/src/microservice/logger/logger.go:163

حال اگر شما متدهای Slog را wrap کرده باشید رخداد داخل تابع wrap شده می باشد و موقعیت اولیه را نمایش می دهد.

func (r Record) source() *Source {
fs := runtime.CallersFrames([]uintptr{r.PC})
f, _ := fs.Next()
return &Source{
Function: f.Function,
File: f.File,
Line: f.Line,
}
}


برای حل این مشکل باید موقعیت اولیه را skip کرد با افزایش offset مربوط به CallersFrames مشکل را میشه حل کرد.


اگر نظری دارید می توانید داخل این issue مشارکت کنید:

https://github.com/golang/go/issues/63319


🕊 @gopher_academy
🤔2👍1🕊1
در این بخش از #الپیک بحث‌های بامزه‌ای در مورد امنیت و رمزنگاری داریم. رمزنگاری با کلید رو درک می‌کنیم
https://youtu.be/qfARNLChgpE
و درک خوبی از تونل های اس اس اچ عزیز پیدا می‌کنیم
https://youtu.be/YYm3U8hnszo
و در نهایت یاد می‌گیریم اطلاعات رو رمزنگاری و امضا کنیم
https://youtu.be/BhF5pqdVxsA

#جادی

🕊 @gopher_academy
🔥1🎉1🕊1🍾1
Which of the following is not a boolean type in Go?
Anonymous Quiz
5%
True
8%
False
88%
0
😁20🍾2👍1🔥1🎉1
👑Postgres Weekly

https://postgresweekly.com/issues/523


🕊 @gopher_academy
👍3
👑Golang Weekly

https://golangweekly.com/issues/477


🕊 @gopher_academy
👍3
یکی از موارد امنیتی که می تونین توی کدهای خودتون در نظربگیرید

🔻 G101: Hardcoded credentials

🔻 G102: Bind to all interfaces

🔻 G103: Use of unsafe block

🔻 G104: Audit errors not checked

🔻 G107: Url provided to HTTP request as taint input

🔻 G201/G202: SQL query construction using format string/string concatenation

🔻 G304: File path provided as taint input

👑 https://github.com/securego/gosec

🕊 @gopher_academy
👍6
Which of the following is not a integer type in Go?
Anonymous Quiz
6%
uint8
6%
uint64
87%
complex128
👍2🕊1
Which of the following terminates the for loop or switch statement and transfers execution to the statement immediately following the for loop or switch in Go?
Anonymous Quiz
77%
break
10%
continue
13%
goto
👍3🕊1
Deconstructing Type Parameters
Ian Lance Taylor

slices package function signatures
The slices.Clone function is pretty simple: it makes a copy of a slice of any type...

https://go.dev/blog/deconstructing-type-parameters


🕊 @gopher_academy
👍2🕊1🍾1
#دون

‌زبان Ruby به معنی یاقوت سرخ، در سال 1993 توسط یوکیهیرو ماتسوموتو (Yukihiro Matsumoto) دانشمند علوم کامپیوتر اهل ژاپن طراحی شد.

روبی از زبان های Perl , Lisp و Ada الهام گرفته شده است.

هدف از طراحی این زبان، ایجاد تعادل بین برنامه نویسی تابعی و دستوری بود.

این زبان به دلیل پویایی، امنیت، متن باز، شیء گرایی و چندمنظوره بودن، برای نوشتن برنامه های تحت وب، شبکه های اجتماعی و برنامه های حوزه تجارت الکترونیک بسیار مناسب است.

از مهمترین و محبوب ترین فریمورک های روبی می توان به Ruby on Rails اشاره کرد.

#DevTwitter

🕊 @gopher_academy
🔥8👍2🎉1🕊1🍾1
Efficient Go
Data-Driven Performance Optimization

Edited by: Bartłomiej Płotka
Paperback : 498 pages (B5)
Edition : 1
Year : 2023
Publisher : O’Reilly

🕊 @gopher_academy
👍81🔥1🕊1
🎆 Go 1.21.2 and 1.20.9 are released!

🔐 Security: Includes a security fix for the Go command (CVE-2023-39323).

🔈 Announcement: https://groups.google.com/g/golang-announce/c/XBa1oHDevAo?pli=1

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


🕊 @gopher_academy
👍1🎉1🕊1🍾1
👌شناخت بهتر scheduler در گولنگ

همانطور که میدونید concurrency یکی از نقاط قوت گولنگ هست، و این مزیت رو مدیون goroutineهاست. در مورد goroutine و channel شاید زیاد شنیده باشید و خونده باشید، اما چیزی که داره concurrency رو مدیریت میکنه scheduler هست. مقاله ای که معرفی میکنم خدمت شما میتونه شناخت خوبی نسبت به scheduler به شما بده.

Behind the Scenes of Go Scheduler

https://dev.to/sourikghosh/behind-the-scenes-of-go-scheduler-1hdi

#gocasts

🕊 @gopher_academy
👍83😁2
Monitoring Performance for PostgreSQL with Citus - CYBERTEC

https://www.cybertec-postgresql.com/en/monitoring-performance-citus-postgresql/

#postgresql


🕊 @gopher_academy
3👍3
🌷Understanding Netflix's Backend Architecture: A Deep Dive

https://dev.to/rahulladumor/understanding-netflixs-backend-architecture-a-deep-dive-1f2c


🕊 @gopher_academy
👍2🔥21🕊1
🌷How to Test and Run GitHub Actions Locally

https://earthly.dev/blog/using-github-actions-locally/


🕊 @gopher_academy
🕊21👍1🔥1
3🔥1🕊1
🌷Working without mocks - Learn Go with tests

https://quii.gitbook.io/learn-go-with-tests/testing-fundamentals/working-without-mocks


🕊 @gopher_academy
🔥1🕊1🍾1