Negroni: HTTP middleware written in “idiomatic” Go

Negroni logo

http://negroni.codegangsta.io/


From the GitHub page:

Negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers.

Negroni is not a framework. It is a library that is designed to work directly with net/http.

Negroni is BYOR (Bring your own Router). The Go community already has a number of great http routers available, Negroni tries to play well with all of them by fully supporting net/http.

Create command-line applications with both human and computer friendly output in Perl

https://perlancar.wordpress.com/2015/03/13/pericmd-039-creating-api-friendly-cli-applications-with-parseable-outputs/


Outputs in various tabular formats…

% ./list-files -v
+----------------+------+------+
| name           | size | type |
+----------------+------+------+
| hello          | 1131 | f    |
| list-files     | 988  | f    |
| list-files~    | 989  | f    |
| mycomp         | 902  | f    |
| mycomp2a       | 608  | f    |
| mycomp2b       | 686  | f    |
| mycomp2b+comp  | 1394 | f    |
| pause          | 4096 | d    |
| perl-App-hello | 4096 | d    |
+----------------+------+------+

…Or JSON format:

% ./list-files --json
[200,"OK",["hello","list-files","list-files~","mycomp","mycomp2a","mycomp2b","mycomp2b+comp","pause","perl-App-hello"],{}]