From 5f6e863fe9c4838ed87a4dbb6d0ff1e1855c66a0 Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Fri, 1 Aug 2014 19:06:53 +0200 Subject: [PATCH 1/4] Add quick links --- README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ebca3fc..c849145 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,16 @@ Goat is a Go REST server. You can pronounce it like the _goat_, or _go-at_. Depends on how you like goats. -## Basic Usage +## Contents +- [Usage](#usage) + - [Subrouters](#subrouters) + - [Indices](#indices) + - [Middleware](#middleware) +- [Roadmap](#roadmap) +- [Credits](#credits) +- [License](#license) + +## Usage ```go package main @@ -28,7 +37,7 @@ func main() { } ``` -## Subrouters +### Subrouters You can create subrouters to simplify your code ```go func main() { @@ -45,7 +54,7 @@ func main() { } ``` -## Indices +### Indices Every route can have a description (like `user_login_url`). These can be used to automagically generate an API index (like [this](https://api.github.com)). If you want to hide specific methods, just provide an empty string. @@ -78,7 +87,7 @@ The above example would return the following response on `/`: **Note:** Indices are only supported for `GET` requests. Open an issue, if you want them on other methods, too -## Middleware +### Middleware You can easily include any middleware you like. Important is, that it's in the following format: ```go @@ -104,8 +113,8 @@ func main() { * [ ] Continous integration ## Credits -Goat uses the blazing fast -[httprouter](https://github.com/julienschmidt/httprouter) from Julien Schmidt, -you should really try it out. - +Thanks to Julien Schmidt for the amazing [httprouter](https://github.com/julienschmidt/httprouter) used in this project. +## License +This project is licensed unter MIT, for more information look into the LICENSE +file. From 5001a310d5fdeed37af8c8a4b4ee5b8e0af403f4 Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Fri, 1 Aug 2014 19:37:04 +0200 Subject: [PATCH 2/4] Add philosophy, reformat credits --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c849145..13e6251 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,16 @@ func main() { * [x] Middleware * [ ] Continous integration +## Philosophy +I wanted to create a small, fast and reliable REST API server, which supports +quick JSON and error output, good rooting and easy-to-use middleware. +I have split the files after responsibility to make it easy for everyone to +dive in (start with `goat.go`. + ## Credits -Thanks to Julien Schmidt for the amazing [httprouter](https://github.com/julienschmidt/httprouter) used in this project. +Thanks to Julien Schmidt for the amazing +[httprouter](https://github.com/julienschmidt/httprouter) used in this +project. ## License This project is licensed unter MIT, for more information look into the LICENSE From 69c01e4c2b7f8af0a14c07da35df4bb07b7b9db3 Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Fri, 1 Aug 2014 19:39:19 +0200 Subject: [PATCH 3/4] Add CONTRIBUTION.md --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b0b8a77 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing + +So you want to contribute to Goat? Great! + +Here's a small guide to make this easy for everyone: +1. Fork this repository +2. Create a branch named after your addition (e.g. `my-awesome-feature`) +3. Write many tests (the coverage shouldn't fall) +4. Create pull request + +Thank you! :heart: From 2af6a36116eedf8098c28a67d831bd128604ddce Mon Sep 17 00:00:00 2001 From: Arne Bahlo Date: Fri, 1 Aug 2014 19:41:35 +0200 Subject: [PATCH 4/4] Add feedback section --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 13e6251..71c99bf 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,20 @@ _go-at_. Depends on how you like goats. ## Contents - [Usage](#usage) + - [Parameters](#parameters) - [Subrouters](#subrouters) - [Indices](#indices) - [Middleware](#middleware) - [Roadmap](#roadmap) +- [Philosophy](#philosophy) +- [Fedback](#feedback) - [Credits](#credits) - [License](#license) ## Usage +### Parameters +You can use named parameters and access them through the given `goat.Params`, +wich you can treat as any `map[string]map`. ```go package main @@ -115,9 +121,15 @@ func main() { ## Philosophy I wanted to create a small, fast and reliable REST API server, which supports quick JSON and error output, good rooting and easy-to-use middleware. + I have split the files after responsibility to make it easy for everyone to dive in (start with `goat.go`. +## Feedback +If you have problems, feel free to +[create an issue](https://github.com/bahlo/goat/issues) or drop me an email +at ! + ## Credits Thanks to Julien Schmidt for the amazing [httprouter](https://github.com/julienschmidt/httprouter) used in this