go
Go
This is a guide for how to develop applications and modules/libraries in Go.
Some of it is only applicable for applications, not modules used as libraries in other projects, such as database access and running a server.
Application structure
Generally, I build web applications and libraries/modules.
These are the packages typically present in applications (some may be missing, which typically means I don't need them in the project).
main: contains the main entry point of the application (in directorycmd/app)model: contains the domain model used throughout the other packagessql/sqlite/postgres: contains SQL database-related logic as well as database migrations (under subdirectorymigrations/) and test fixtures (under subdirectorytestdata/fixtures/). The database used is either SQLite or PostgreSQL.sqltest/sqlitetest/postgrestest: package used in testing, for setting up and tearing down test databasess3: logic for interacting with Amazon S3 or compatible object storess3test: package used in testing, for setting up and tearing down test S3 bucketsllm: clients for interacting with large language models (LLMs) and foundation models
More from maragudk/skills
datastar
Guide for building interactive web UIs with Datastar and gomponents-datastar. Use this skill when adding frontend interactivity to Go web applications with Datastar attributes.
75marimo
Guide for creating and working with marimo notebooks, the reactive Python notebook that stores as pure .py files. This skill should be used when creating, editing, running, or deploying marimo notebooks.
51brainstorm
Guide for how to brainstorm an idea and turn it into a fully formed design.
41code-review
Guide for making code reviews. Use this when asked to make code reviews, or ask to use it before committing changes.
38bluesky
Guide for posting content to the Bluesky social network using the bsky terminal app. This skill should be used proactively when working in public repositories and there is interesting, shareable content (new features, insights, achievements, or announcements worth sharing with the community). Use it when asked to post to Bluesky, or when content seems worth sharing publicly.
37save-web-page
Guide for saving a web page for offline use using the monolith CLI. Use this when instructed to save a web page.
37