Skip to content

Commit

Permalink
Merge pull request #2 from lab259/dev
Browse files Browse the repository at this point in the history
New routing API + built-in error handling + 0 allocations... and more
  • Loading branch information
jamillosantos authored May 6, 2019
2 parents 11fe5e8 + 6a32d53 commit 2649c43
Show file tree
Hide file tree
Showing 52 changed files with 2,982 additions and 865 deletions.
26 changes: 18 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@ version: 2
jobs:
build:
docker:
- image: circleci/golang:1.9
- image: circleci/golang:1.9

working_directory: /go/src/github.com/jamillosantos/http
steps:
- checkout

# specify any bash command here prefixed with `run: `
- run: go get -u github.com/onsi/ginkgo/ginkgo
- run: make deps-ci
- run: make coverage-ci
- run: bash <(curl -s https://codecov.io/bash)
- checkout
- restore_cache:
keys:
- deps-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
- deps-{{ .Branch }}-
- deps-
- run: go get -u github.com/onsi/ginkgo/ginkgo
- run: make dep-ensure
- save_cache:
key: deps-{{ .Branch }}-{{ checksum "Gopkg.lock" }}
paths:
- vendor
- run: make build
- run: make coverage-ci
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: test-results
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
coverage.txt
*.out
pkg/
.cover/
.idea/
*.coverprofile
.gopath/
.vscode/
vendor/
.vscode/
bin/
test-results/
bench-results/
*.fasthttp.gz
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## Contributing

### Prerequisites

What things you need to setup the project:

- [go](https://golang.org/doc/install)
- [golang/dep](https://github.com/golang/dep)
- [ginkgo](http://onsi.github.io/ginkgo/)

### Environment

For start developing the SDK you must create a fake `GOPATH` structure:

```
+-- /
|---- src
|------ github.com
|-------- lab259
|---------- http <- Here is where you will clone this repository.
```

Use the following command:

```bash
mkdir -p src/github.com/lab259/http && git clone [email protected]:lab259/http.git src/github.com/lab259/http
```

Now, the dependencies must be installed.

```
cd src/github.com/lab259/http && make dep-ensure
```

:wink: Finally, you are done to start developing.

### Running tests

In the `src/github.com/lab259/http` directory, execute:

```bash
make test
```

To enable coverage, execute:

```bash
make coverage
```

To generate the HTML coverage report, execute:

```bash
make coverage coverage-html
```

### Running examples

In the `src/github.com/lab259/http` directory, execute:

```bash
EXAMPLE="todos" make run
```

`EXAMPLE` is any example listed in `/examples` folder.
Loading

0 comments on commit 2649c43

Please sign in to comment.