✅ آموزش استفاده از go.work و ورژن بندی هر ماژول
در زیر آموزش استفاده از go workspace را قرار دادیم که بتوانید چندین ماژول با ورژن اختصاصی تعریف و داخل pkg.go.dev چطور ثبت کنید.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
در زیر آموزش استفاده از go workspace را قرار دادیم که بتوانید چندین ماژول با ورژن اختصاصی تعریف و داخل pkg.go.dev چطور ثبت کنید.
مخزن: https://github.com/Ja7ad/go-work
پکیج: https://pkg.go.dev/pkg.go.dev/github.com/Ja7ad/go-work
ماژول ۱: https://pkg.go.dev/github.com/Ja7ad/go-work/mod1
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
👍5
اگر پرمیوم هستید در تلگرام می توانید با زدن Boost از کانال گوفر آکادمی و گروه مهندسین گولنگ حمایت کنید.
https://t.me/gopher_academy?boost
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
https://t.me/gopher_academy?boost
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
🍾4
#fact
In Go (Golang), the boolean values true and false are untyped bool. This means that unlike many other programming languages, where boolean values have a specific type (e.g., bool), in Go, true and false are untyped. This design choice allows for greater flexibility in certain expressions and comparisons. The constants true and false are defined as untyped bool constants, and they can be used in various contexts without requiring explicit casting to a boolean type. This is a distinctive feature of Go's type system.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
In Go (Golang), the boolean values true and false are untyped bool. This means that unlike many other programming languages, where boolean values have a specific type (e.g., bool), in Go, true and false are untyped. This design choice allows for greater flexibility in certain expressions and comparisons. The constants true and false are defined as untyped bool constants, and they can be used in various contexts without requiring explicit casting to a boolean type. This is a distinctive feature of Go's type system.
// true and false are the two untyped boolean values.
const (
true = 0 == 0 // Untyped bool.
false = 0 != 0 // Untyped bool.
)
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
👍3💊2🕊1
دیتابیس PostgreSQL قابلیت Full-Text search داره که خیلی وقت ها میتونه نیازمندی هارو پوشش بده و لازم نباشه سرویسی مثل elasticsearch رو بصورت مجزا استفاده کرد. چون نگهداری و مدیریت هر سرویس جدید هم هزینه نیروی انسانی داره و هم هزینه زمانی و انتقال دانش و کسب تجربه و غیره.
این مقاله قابلیت های دیتابیس PostgreSQL برای Full-Text search رو بیان میکنه
Create an advanced search engine with PostgreSQL
https://xata.io/blog/postgres-full-text-search-engine
#gocasts
#database #postgres
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
این مقاله قابلیت های دیتابیس PostgreSQL برای Full-Text search رو بیان میکنه
Create an advanced search engine with PostgreSQL
https://xata.io/blog/postgres-full-text-search-engine
#gocasts
#database #postgres
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
👍4❤2🕊2🔥1🍾1
مجموعه نوشتههای درهم و برهم یک محقیق امنیتی در مورد مسایل مختلف که در قالب یک کتاب دراورده شده.
https://ppn.snovvcrash.rocks
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
https://ppn.snovvcrash.rocks
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
👍5❤3🔥1🍾1💊1
1698886842698.jpg
179.8 KB
👍2🔥1💊1
This has been added to Go 1.22:
https://github.com/golang/go/issues/61410
Examples:
🕊 @gopher_academy
https://github.com/golang/go/issues/61410
Examples:
mux := http.NewServeMux()➖➖➖➖➖➖➖➖
mux.HandleFunc("POST /user/$", ...)
mux.HandleFunc("GET /user/{username}", ...)
mux.HandleFunc("GET /website/{item...}", ...)
🕊 @gopher_academy
👍14🔥3💊3
Go With The Domain - DevTwitter.pdf
21.1 MB
#Go
Go With The Domain
Building Modern Business Software in Go
- By Robert Laszczak and Milosz Smolka
- 221 Pages
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
Go With The Domain
Building Modern Business Software in Go
- By Robert Laszczak and Milosz Smolka
- 221 Pages
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
🍾4🔥2💊1
😴TDD Outcomes: The Good & The Bad
🔰 https://open.substack.com/pub/tidyfirst/p/tdd-outcomes
✍️ KENT BECK | NOV 15, 2023
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
🔰 https://open.substack.com/pub/tidyfirst/p/tdd-outcomes
✍️ KENT BECK | NOV 15, 2023
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
❤1👍1🔥1
🔵Golang Structs Memory Benchmarks
🔴https://prog-bytes.hashnode.dev/golang-structs-memory-allocation-ii
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
🔴https://prog-bytes.hashnode.dev/golang-structs-memory-allocation-ii
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
❤1👍1🔥1🕊1
این ریپو لیستی از پروژه های اوپن سورسه که ایرانی ها ساختنش
چیزای بدرد بخوری توش داره حتما نگاهی بهش بندازید.
https://github.com/mohebifar/made-in-iran
#DevTwitter | <Reza Omranian/>
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
چیزای بدرد بخوری توش داره حتما نگاهی بهش بندازید.
https://github.com/mohebifar/made-in-iran
#DevTwitter | <Reza Omranian/>
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
🍾5😁2🕊2💊1
🔷️How Databases Execute SQL Statements?
🌏1. A SQL statement starts in a client program and gets sent over the network to the database server.
🌏2. When the database server receives the SQL statement, the relational engine starts processing it. First the command parser checks that the statement is valid. Then it converts the statement into a query tree, which is an internal data structure.
🌏3. The query optimizer looks at the query tree and figures out the most efficient way to execute the SQL statement, creating an execution plan.
🌏4. The execution plan gets passed to the query executor, which uses it to coordinate retrieving or changing the data as directed by the SQL statement. The executor interacts with the storage engine to access the data.
🌏5. The storage engine uses access methods, which are protocols for reading and writing data in the most efficient way for different operations.
🌏6. For reading data, the buffer manager checks if the required data is cached in memory and fetches it from disk if needed. This speeds up subsequent access.
🌏7. For writing data with inserts or updates, the transaction manager makes sure the changes happen atomically and maintain the database's integrity.
🌏8. At the same time, the lock manager applies locks so multiple transactions can happen simultaneously without conflict. This maintains isolation and consistency.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
🌏1. A SQL statement starts in a client program and gets sent over the network to the database server.
🌏2. When the database server receives the SQL statement, the relational engine starts processing it. First the command parser checks that the statement is valid. Then it converts the statement into a query tree, which is an internal data structure.
🌏3. The query optimizer looks at the query tree and figures out the most efficient way to execute the SQL statement, creating an execution plan.
🌏4. The execution plan gets passed to the query executor, which uses it to coordinate retrieving or changing the data as directed by the SQL statement. The executor interacts with the storage engine to access the data.
🌏5. The storage engine uses access methods, which are protocols for reading and writing data in the most efficient way for different operations.
🌏6. For reading data, the buffer manager checks if the required data is cached in memory and fetches it from disk if needed. This speeds up subsequent access.
🌏7. For writing data with inserts or updates, the transaction manager makes sure the changes happen atomically and maintain the database's integrity.
🌏8. At the same time, the lock manager applies locks so multiple transactions can happen simultaneously without conflict. This maintains isolation and consistency.
➖➖➖➖➖➖➖➖
🕊 @gopher_academy
👍9