Giter Site home page Giter Site logo

nginx-config-formatter's Introduction

Nginx Config Formatter

nginx config file formatter/beautifier written in Go. This is a port of the original formatter written in python here: 1connect/nginx-config-formatter

Go

This Go app script formats nginx configuration files in consistent way, described below:

  • all lines are indented in uniform manner, with 4 spaces per level
  • neighbouring empty lines are collapsed to at most two empty lines
  • curly braces placement follows Java convention
  • whitespaces are collapsed, except in comments an quotation marks
  • whitespaces in variable designators are removed: ${ my_variable } is collapsed to ${my_variable}

Installation

Go get to run this app:

go get github.com/gnagel/nginx-config-formatter
go tool github.com/gnagel/nginx-config-formatter ...  

Usage

Usage:
  nginx-config-formatter [command]

Available Commands:
  fmt         Nginx config file formatter
  help        Help about any command

Flags:
      --config string   config file (default is $HOME/.nginx-config-formatter.yaml)
  -h, --help            help for nginx-config-formatter
  -t, --toggle          Help message for toggle

Use "nginx-config-formatter [command] --help" for more information about a command.

Credits

Copyright 2020 G. Nagel, credit for original inspiration goes to Michał Słomkowski.

nginx-config-formatter's People

Contributors

gnagel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.