amihan

command module
v0.0.0-...-816e526 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 7 Imported by: 0

README

Go Project Template

This is an opinionated go project template to use as a starting point for new projects.

Features

  • Builds with GoReleaser
    • Automated with GitHub Actions
    • Signed with Cosign (providing you generate a private key)
  • Builds with Docker
    • While designed to use goreleaser, you can still just run docker build
  • Opinionated Layout
    • Never use internal/ folder
    • Everything is under pkg/ folder
  • Automatic Dependency Management with Renovate
  • Automatic Releases with Release Drafter
  • Documentation with Material for MkDocs
  • API Server Example
    • Uses Gorilla Mux (yes it's been archived, still the best option)
  • Stubbed out Go Tests
    • They are not comprehensive

Building

The following will build binaries in snapshot order.

goreleaser --clean --snapshot

Configure

  1. Rename Repository
  2. Generate Cosign Keys
  3. Update .goreleaser.yml
  4. Update main.go
Signing
  1. Create a password
    • Recommend exporting in environment as COSIGN_PASSWORD
  2. Generate cosign keys
  3. Create GitHub Action Secrets
    • COSIGN_KEY -> populate with cosign.key value
    • COSIGN_PASSWORD -> populate with password from step 1
Generate Keypair
cosign generate-key-pair

Documentation

The project is built to have the documentation right alongside the code in the docs/ directory leveraging Mkdocs Material.

In the root of the project exists mkdocs.yml which drives the configuration for the documentation.

This README.md is currently copied to docs/index.md and the documentation is automatically published to the GitHub pages location for this repository using a GitHub Action workflow. It does not use the gh-pages branch.

Running Locally
make docs-serve

OR (if you have docker)

docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL