Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Commit

Permalink
Merge branch 'better-readme'
Browse files Browse the repository at this point in the history
* better-readme:
  Add feedback section
  Add CONTRIBUTION.md
  Add philosophy, reformat credits
  Add quick links
  • Loading branch information
bahlo committed Aug 1, 2014
2 parents 617a9b3 + 2af6a36 commit 6cbad96
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 8 deletions.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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:
45 changes: 37 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,22 @@
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)
- [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

Expand All @@ -28,7 +43,7 @@ func main() {
}
```

## Subrouters
### Subrouters
You can create subrouters to simplify your code
```go
func main() {
Expand All @@ -45,7 +60,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.
Expand Down Expand Up @@ -78,7 +93,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
Expand All @@ -103,9 +118,23 @@ func main() {
* [x] Middleware
* [ ] Continous integration

## Credits
Goat uses the blazing fast
[httprouter](https://github.com/julienschmidt/httprouter) from Julien Schmidt,
you should really try it out.
## 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 <hallo@arne.me>!

## Credits
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.

0 comments on commit 6cbad96

Please # to comment.