module
Version:
v0.0.0-...-3288de0
Opens a new window with list of versions in this module.
Published: Nov 1, 2023
License: MIT
Opens a new window with license information.
README
¶
template
Base template for Go servers. It is barebones by design to just provide a
starting point for new projects.
Opinions
The template is opinionated in the following ways:
- Uses slog as the structured logger
- Uses chi as the router
- Uses goose for database migrations
- Uses sqlx to extend the stdlib sql package
- Uses env for loading environment variables into structs
Requirements
The project has a few requirements that need to be met in order to work.
Usage
A new project can be created using the experimental gonew tool. More details
about the tool can be found in this post.
- Installation
go install golang.org/x/tools/cmd/gonew@latest
- Create a new project from the template
gonew github.com/ffss92/template <project-name> <folder>
Directories
¶
cmd
|
|
|
|
|
internal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.