Analyze the configuration of httpd and make it json
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
misc
panalysis
.gitignore
.travis.yml
CHANGELOG.md
Makefile
README.md
cli.go
go.mod
go.sum
main.go
version

README.md

panalysis

Description

Analyze the configuration of httpd and make it json

Usage

$ cat httpd.conf | panalysis -c
=>
[
  {
    "VirtualHost": {
      "172.20.30.50": [
        {
          "DocumentRoot": "/www/example1"
        },
        {
          "ServerName": "www.example.com"
        }
      ]
    }
  },
  {
    "FilesMatch": {
      "\"\\.(gif|jpe?g|png)$\"": null
    }
  }
]

$ cat httpd.json | panalysis -j
=>
<VirtualHost 172.20.30.50>
  DocumentRoot /www/example1
  ServerName www.example.com
</VirtualHost>
<FilesMatch "\.(gif|jpe?g|png)$">
</FilesMatch>

Install

To install, use go get:

$ go get -d github.com/pyama86/panalysis

Contribution

  1. Fork (https://github.com/pyama86/panalysis/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

pyama86