Skip to content

yokeTH/gofiber-template

Repository files navigation

gofiber-template

My backend template using Golang + Fiber

Prerequisites

  • Golang 1.24.0 or newer
  • golangci-lint
  • pre-commit

Rename Package

  1. Rename Go module name:

    go mod edit -module YOUR_MODULE_NAME

    Example:

    go mod edit -module github.com/yourusername/yourprojectname
  2. Find all occurrences of github.com/yokeTH/gofiber-template/internal and replace them with YOUR_MODULE_NAME:

    find . -type f -name '*.go' -exec sed -i '' 's|github.com/yokeTH/gofiber-template|YOUR_MODULE_NAME|g' {} +

Pre-commit

Install pre-commit and set up hooks:

brew install pre-commit
pre-commit install

Commit Lint

Install and initialize commitlint to enforce commit message conventions:

go install github.com/conventionalcommit/commitlint@latest
commitlint init

Example commit message:

feat: add user authentication

Post-Rename Dependency Cleanup

After renaming the module, ensure dependencies are updated:

go mod tidy

About

My backend template using golang + fiber

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published