Been working on sharing this one idea in the book for days and I think I'm very close.
---
As a general rule, a package should have a clear purpose and not contain a set of different pieces of functionality. Examples of packages that provide are http, net, fmt, and json. Examples of packages that contain are utils, common, helpers, and the very worse one, models.
If a project has a package that maintains a common set of types, that project is doomed to fail. Why?
Because a project in Go is not a monolithic collection of code as seen in other languages. It's a collection of packages that each expose a purposeful API that work and integrate together to solve the business problem. It’s important to change the idea that a type system belongs to a project. Switch to the idea that a type system belongs to a package. This will allow packages to be properly isolated and available for change without those changes creating large cascading code breakages throughout the project.
That needs to be a goal.
🧑🚀⭐ Calling all aspiring astronauts—Astro 3.0 touches down next week. We're giving away 10 of these official Astro hats to celebrate!
Retweet for your chance to win.
SPONSOR POST
Going to #GopherconEU?🤓 Then you qualify for a chance to win a FREE #Go Bundle from @ardanlabs!
Follow the steps below for your chance to win!😎
✍️Giveaway entries will be open until June 29th!
The winner will be announced June 30th🥳 #ArdanLabsGopherconEU
4 Followers 78 FollowingBringing SaaS products to market that solve real world problems.
Are you building a SaaS or looking to hire remote devs?
Let's chat!
884 Followers 144 FollowingCo-founder в @plan4travel, PM, автор, бывший юрист. Пишу о запуске продуктов, стартапах, личной эффективности. Изредка мысли и кринж.
16K Followers 1K FollowingRust / backend dev / org design / climate. Baking on the good days.
Author of https://t.co/WDxzUHAAe6.
Building https://t.co/YMfw1oaHIi, a new Rust web framework.
10K Followers 2K FollowingCreator, Founder and CEO of @TigerBeetleDB — the financial transactions database designed to power the next 30 years of transaction processing.
25K Followers 3K FollowingOn the planet to build a better planet. Software person, kind of into Rust and creative coding. Author of Rust in Action (https://t.co/qgWenxBkeP).
35K Followers 334 FollowingConstantly frustrated and confused, purveyor of useless opinions. Fascinated by AI. Rancher, k3s has been. Member @Ch_JesusChrist
803K Followers 211 FollowingGeopolitics | Nuanced | Memes | Crazy footage | DM submissions welcome | Trying to be neutral | Video analysis, translations, heavy edits and creation