首页
手机版
热门搜索:
当前位置:电脑软件网络软件服务器区nginxConfigFormatterGo

nginxConfigFormatterGo 免费版v1.0.0

  • 大小:12KB
  • 语言:简体中文
  • 类别:服务器区
  • 类型:免费软件
  • 授权:国产软件
  • 时间:2020/07/20
  • 官网:https://www.3h3.com
  • 环境:Windows7, Windows10, WindowsAll

相关软件

服务器上的配置文件如果不加以管理,nginx配置文件就会变得乱七八糟。nginxConfigFormatterGo可以高效率地进行二进制文件的打包,可以在服务器上使用,使用go语音编写,执行的效率更高。

软件介绍

nginxConfigFormatterGo是一款nginx配置文件格式化工具,作者使用go语言开发,通过nginxConfigFormatterGo可以根据不同的系统进行打包二进制文件在服务器上使用,执行效率更高。

nginxConfigFormatterGo图片

软件特色

可预测的格式化结果.

所有的注释都独立一行.

连续的多个空行合并为一个空行.

花括号使用Java的习惯.

所有的行使用统一的方式进行缩进, 缩进的空格数由用户指定 (默认 4 个空格).

多余的空白字符合并为一个空格, 但是在注释和引号中的空白字符不进行任何处理.

安装方法

1. go get 方式

go get github.com/rwx------/nginxConfigFormatterGo

# 可能会被安装在如下目录

$HOME/go/bin/nginxConfigFormatterGo

2. go build 方式

git clone https ://github.com/rwx------/nginxConfigFormatterGo.git

cd nginxConfigFormatterGo

go build

3. 预编译好的二进制包

你可以在 发布页面 获取预编译的二进制包.

# linux

wget https://github.com/rwx------/nginxConfigFormatterGo/releases/download/v1.0.0/nginxConfigFormatterGo_linux_amd64 -O /usr/local/bin/nginxConfigFormatterGo

chmod +x /usr/local/bin/nginxConfigFormatterGo

# mac

wget https://github.com/rwx------/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                 显示本页的帮助信

更新日志

方式设置缩进的空格数.(默认4个空格缩进)

支持了更多的文件字符集

修复了多行配置的分解问题(这个在原python项目中没有修复)

修复了"和'的配置问题(原python项目中只要匹配到", '就算是在引号内的内容, 前一个是 ", 后一个 ' 时, 会被认为是引号外. 还有在 注释中的" '也会被解析, 造成引号内的内容错乱)

不必对${variable} 及 rewrite 中的 {}进行特殊处理, 因为nginx配置文件的语法中, 这些时候的花括号都需要被引号包围, 不然语法解析通不过(指 nginx -t ).

减少了一些不必要的重复处理, 从原来的7次全量读写优化到6次全量读写.

标签: 服务器管理

下载地址

nginxConfigFormatterGo 免费版v1.0.0

普通下载通道

网友评论

返回顶部