代码拉取完成,页面将自动刷新
使用go语言开发的, 优雅的nginx配置文件格式化工具
受 https://github.com/1connect/nginx-config-formatter.git 项目激发和鼓励
之前也有给该项目提交过补丁, 还是决定用go重新造一遍轮子.
go 1.20
go get gitee.com/RickieL/nginxConfigFormatterGo
# 可能会被安装在如下目录
$HOME/go/bin/nginxConfigFormatterGo
git clone https://gitee.com/RickieL/nginxConfigFormatterGo.git
cd nginxConfigFormatterGo
go build
你可以在 发布页面 获取预编译的二进制包.
# linux
wget https://gitee.com/RickieL/nginxConfigFormatterGo/releases/download/v1.0.0/nginxConfigFormatterGo_linux_amd64 -O /usr/local/bin/nginxConfigFormatterGo
chmod +x /usr/local/bin/nginxConfigFormatterGo
# mac
wget https://gitee.com/RickieL/nginxConfigFormatterGo/releases/download/v1.0.0/nginxConfigFormatterGo_darwin_amd64 -O /usr/local/bin/nginxConfigFormatterGo
chmod +x /usr/local/bin/nginxConfigFormatterGo
NAME:
nginxConfigFormatterGo - nginx 格式化工具
USAGE:
./nginxConfigFormatterGo [-s 2] [-c utf-8] [-b] [-v] [-t] <filelists>
DESCRIPTION:
nginx 格式化工具
AUTHOR:
github.com/rwx------
COMMANDS:
help, h 显示命令列表或单个命令的帮助
GLOBAL OPTIONS:
--charset value, -c value 当前支持的字符集: gbk, gb18030, windows-1252, utf-8 (默认: "utf-8")
--space value, -s value 缩进的空格数 (默认: 4)
--backup, -b 备份原始的配置文件
--verbose, -v 冗长模式
--testing, -t 只进行测试, 不真正执行
--help, -h 显示本页的帮助信息
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。