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

create-golang-app

v2.0.0

Published

this is a cli to create a Go web template

Readme

create-golang-app

创建 Go Web 通用脚手架

这里使用的是 gin 框架

使用的模块

ejs `模板引擎`
inquirer `用户输入配置`

node 版本

v16.4.0(这里使用nvm管理node版本)

git 标准提交

[cz-cli](https://github.com/commitizen/cz-cli)
[git-cz](https://github.com/streamich/git-cz)

关于脚手架的开发

  全局使用create-golang-app命令,需要在package.json中添加以下内容。
  "bin": {
    "create-golang-app": "./index.js"
  }
  在index.js中添加。
  使用env来找到node,并使用node来作为程序的解释程序。
  #!/usr/bin/env node

本地测试

本地安装 image-20220212201458299

image-20220212201555235

image-20220212202720598

image-20220212202848501

使用air启动项目

使用Air实现Go程序实时热重载

image-20220212202910032

image-20220212202927496

create-golang-app 使用

全局安装
cnpm i create-golang-app -g

使用 create-golang-app 创建 Go Web项目

image-20220219134639893

create-golang-app

版本说明

v0.0.1 基础架构...
v1.0.1 微调优化代码...
v1.0.2 微调添加配置说明...
v1.0.3 微调...
v1.0.4 添加air对代码进行优化...
v1.0.5 添加初始化时github参数.
v1.1.0 微调...
v2.0.0 update go version 1.16 -> 1.18 更新文件夹与文件命名

关于配置

请自行修改

/conf/config.yaml

mysql 默认 用户名 root 密码 root 数据库 dbname 端口 3306

redis 默认 端口 6379

关于生成的go.mod 文文件请自行修该为自己的 go version

image-20220530110143050

swagger生成接口文档

Go语言基础之单元测试

常用的HTTP服务压测工具介绍

常用限流策略——漏桶与令牌桶介绍

Go性能调优

如何使用Docker部署Go Web应用

部署Go语言项目的 N 种方法