npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mai0313/gotemp

v0.1.15

Published

A production-ready Go project template to bootstrap new projects fast. It includes a clean Go module layout, Docker, and a complete CI/CD suite.

Readme

Go 專案模板

Go npm version npm downloads tests code-quality pre-commit license PRs contributors

🚀 幫助 Golang 開發者「快速建立新專案」的模板。提供務實的專案結構、Makefile、Docker 多階段建置,以及完整的 GitHub Actions 工作流程。

點擊 使用此模板 後即可開始。

其他語言: English | 繁體中文 | 简体中文

✨ 重點特色

  • Makefile 工作流:build、test、跨平台編譯、fmt、dead‑code 掃描
  • 內建版本資訊:以 -ldflags 注入 version、build time、git commit
  • 範例 CLI:cmd/go_template,支援 --version
  • 單元測試與 CI 覆蓋率報告產物
  • Docker:多階段建置,最小化執行環境
  • GitHub Actions:測試、靜態檢查(golangci‑lint)、映像建置/推送、Release Drafter、標籤、自動秘密/程式碼掃描

🚀 快速開始

需求:

  • Go 1.24+
  • Docker(可選,用於容器化建置)

本機開發:

make build            # 編譯到 ./build/
make run              # 編譯並執行主程式
make test             # 執行測試並輸出覆蓋率
make fmt              # go fmt ./...
make build-all        # 跨平台編譯常見 OS/ARCH

執行範例 CLI:

./build/go_template --version

作為模板使用:

  1. 點擊「使用此模板」建立你的倉庫
  2. 視需求修改 go.mod 的 module 名稱
  3. 若要更換二進位名稱,請調整 cmd/ 目錄結構

專案結構

cmd/go_template/     # 主 CLI 入口
core/version/        # 版本工具與測試
build/               # 編譯輸出(已加入 .gitignore)
docker/Dockerfile    # 多階段映像建置

Docker

# 本地建置與執行
docker build -t your/image:dev -f docker/Dockerfile .
docker run --rm -it your/image:dev

CI/CD(GitHub Actions)

  • 測試:.github/workflows/test.yml
  • 品質:.github/workflows/code-quality-check.yml
  • 釋出打包:.github/workflows/build_release.yml
  • Docker 映像:.github/workflows/build_image.yml
  • 釋出草稿:.github/workflows/release_drafter.yml
  • 標籤與語義化:.github/workflows/auto_labeler.yml, semantic-pull-request.yml
  • 安全性:.github/workflows/code_scan.yml(gitleaks、trivy、codeql)

貢獻指南

  • 提交前請執行 make fmt && make test
  • PR 請聚焦單一變更並附上測試
  • 使用 Conventional Commits 作為提交訊息