Gopher Academy
3.34K subscribers
918 photos
40 videos
279 files
2K links
🕸 Gopher Academy

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

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

ادمین:
@mrbardia72
Download Telegram
nil is not always nil.

#Tweet by inanc

🕊 @gopher_academy
👍10🌭31
اشاره گر (pointer) چیست؟

فرض کنید یک متغیری به نام tweet دارید مانند زیر:

tweet := "...content..."

آدرس حافظه فرضا: 0x0001

این متغیر به همراه مقدارش در خانه ای از حافظه اصلی (RAM) قرار میگیرد.

p := &tweet

حال اگر شما با استفاده از & قبل از نام متغیر tweet داخل متغیر p قرار دهید، یعنی دارید به آدرس خانه حافظه tweet اشاره می کنید و مقدار خانه حافظه متغیر p هم 0x0001 خواهد بود که به متغیر tweet اشاره می کند.

اصولاً به اینکار reference می گویند.

*p

حال اگر قبل از متغیر p یک * بزارید می توانید به مقدار اشاره شده داخل متغیر p که همان متغیر tweet هست دسترسی پیدا کنید.

اصولاً به اینکار deference میگویند.

حتی شما می توانید p* را مجدد مقدار دهی کنید و مقدار tweet هم تغییر خواهد کرد.

"...content..."



🕊 @gopher_academy
👍13👎4
When to use what?

Go ↓
Infrastructural programming and servers. Less is more. Simplicity.

Rust ↓
Resource-constrained environments. Every byte and CPU cycle matters. Safety is critical. Can’t say simple.

Pick your poison ☠️ 😂

#Tweet by inanc

🕊 @gopher_academy
👍12💊3
The UNIX philosophy is often quoted as “everything is a file”, but that really means “everything is a stream of bytes”.

— Linus Torvalds


🕊 @gopher_academy
👍8💯3💊3
آموزش کامل رزومه نویسی + لینکدین

https://youtu.be/U-JU0SXsRWw

#DevTwitter


🕊 @gopher_academy
👍54🎉1
📕 Strategic Monoliths and Microservices
Driving Innovation Using Purposeful Architecture

Edited by: Vaughn Vernon, Tomasz Jaskuła
Paperback : 348 pages (B5)
Edition : 1
Year : 2022
Publisher : Addison-Wesley

Code: A2783
See in Amazon

🛒 🌐 https://skybooks.ir


🕊 @gopher_academy
👍7
In Go, everything is passed by value. Even pointers.

#Tweet by inanc

🕊 @gopher_academy
🤔5👍2
🔥 Go is unconventional yet versatile.

🔥 Go isn't just OOP, functional, or procedural.

🚀 It's a unique blend of all and beyond.

If you aim for idiomatic code, don't confine it to any one style.

#Tweet by inanc

🕊 @gopher_academy
👍4👎1🍌1💊1
اولین آمارها از اخراج افراد به خاطر هوش مصنوعی منتشر شد
طبق گزارش ماه May چلنجر در آمریکا حدود ۸۰ هزار نفر از کار اخراج شدن که ۴ هزار نفرشون به خاطر هوش مصنوعی بوده
در کنار این گفتن تازه خیلی از شرکت‌ها نمیگن دلیل اصلیشون برای اخراج AI بوده که میتونه عدد بیشتر از اینها باشه

#DevTwitter | <Soroush Ahmadi/>

🕊 @gopher_academy
👀9👎3🔥1🌭1🍓1👨‍💻1
In golang, we "expect" errors, but we don't "expect" panics.

😊 Errors are our sane behavior
😱 Panics are our manic behavior

#Tweet by inanc

🕊 @gopher_academy
👍3🌭2🍾1💊1
🔵Logging in Go: Choosing a System and Using it

🔴https://www.honeybadger.io/blog/golang-logging/


🕊 @gopher_academy
👍3🔥1🐳1
🔵Introduction to the Go compiler

🔴https://go.dev/src/cmd/compile/README


🕊 @gopher_academy
👍3🕊1🏆1
100% test coverage != bug-free🪳

#Tweet by inanc

🕊 @gopher_academy
👍6🍓1
A few golang tips for writing effective Go code:

1. Make it easy to read from top to bottom
2. Do not hide the cost of doing something
3. Do not prematurely abstract

These are not rules, just advice.

#Tweet by inanc

🕊 @gopher_academy
🍌2👍1🕊1
🔵Finding The Best Go Project Structure - Part 1

🔻Structuring Approach
🔻Single Package Approach
🔻Coupled Packages Approach
🔻Independent Packages Approach
🔻Retrospective Analysis
🔻Reusability Issues
🔻Undeclared Dependencies

🟢https://avivcarmi.com/finding-the-best-go-project-structure-part-1/

🕊 @gopher_academy
👍3🍾2👎1👏1
🚀 golang Optimization Tip:

Convert string to []byte without allocation.

Only do this in a hot spot after careful consideration.

#Tweet by inanc

🕊 @gopher_academy
👍3👀2💊1

🕊 @gopher_academy
🤣13🍌2👍1🌭1
🚀 golang Optimization Tip:

Convert []byte to string without allocation.

Only do this in a hot spot after careful consideration.

#Tweet by inanc

🕊 @gopher_academy
👍6
🔵Implementing a distributed key-value store on top of implementing Raft in Go

🟢https://notes.eatonphil.com/2023-05-25-raft.html


🕊 @gopher_academy
👍1💊1