Gopher Academy
3.33K subscribers
917 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
nil is not always nil.

#Tweet by inanc
βž–βž–βž–βž–βž–βž–βž–βž–βž–
πŸ•Š @gopher_academy
πŸ‘10🌭3❀1
βœ… 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
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
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
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
πŸš€ 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
πŸš€ 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
βœ… An error message better not contain:

failed,
cannot,
can't, ...

It's an error already + you hurt chained err output:

failed to open:
failed to connect:
failed to fly: ...

Instead, do

opening:
connecting:
flying: no wings exist.


#Tweet by inanc
βž–βž–βž–βž–βž–βž–βž–βž–βž–
πŸ•Š @gopher_academy
πŸ‘7πŸ’Š3πŸ‘Ž1