Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamesog/nginxfmt
Nginx configuration formatter, inspired by gofmt
https://github.com/jamesog/nginxfmt
formatter nginx
Last synced: 3 months ago
JSON representation
Nginx configuration formatter, inspired by gofmt
- Host: GitHub
- URL: https://github.com/jamesog/nginxfmt
- Owner: jamesog
- License: other
- Created: 2022-04-24T16:06:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-24T16:13:39.000Z (over 2 years ago)
- Last Synced: 2024-06-20T12:53:00.983Z (7 months ago)
- Topics: formatter, nginx
- Language: Go
- Homepage:
- Size: 23.4 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nginxfmt
Takes [Nginx](https://nginx.org/) configuration files and run them through
[go-crossplane](https://github.com/aluttik/go-crossplane).This program is heavily inspired by `gofmt` and re-uses a lot of code and
style from that program.## Usage
```
nginxfmt [flags] [path ...]
```Flags are:
- `-l`
Do not print reformatted configuration to standard output.
If a file's formatting is different from `nginxfmt`'s, print its name
to standard output.
- `-w`
Do not print reformatted configuration to standard output.
If a file's formatting is different from `nginxfmt`'s, overwrite it with
`nginxfmt`'s version.The `path`s can be a list of file names and/or directories. If a directory is
given, it is assumed all files in the directory are Nginx configuration files
for processing.