Adds gotemplate files

This commit is contained in:
Tom Hudson 2016-03-28 15:11:23 +01:00
parent 3cbc5e2ab0
commit a34f4bd376
7 changed files with 50 additions and 10 deletions

View File

@ -5,4 +5,12 @@ go:
- 1.3
- 1.4
- 1.5
- 1.6
- tip
install:
- ./script/bootstrap
script:
- ./script/test
- ./script/lint

10
CONTRIBUTING.mkd Normal file
View File

@ -0,0 +1,10 @@
# Contributing
* Raise an issue if appropriate
* Fork the repo
* Bootstrap the dev dependencies (run `./script/bootstrap`)
* Make your changes
* Use [gofmt](https://golang.org/cmd/gofmt/)
* Make sure the tests pass (run `./script/test`)
* Make sure the linters pass (run `./script/lint`)
* Issue a pull request

27
LICENSE
View File

@ -1,12 +1,21 @@
Copyright (c) 2015 Tom Hudson <mail@tomnomnom.com>
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright (c) 2016 Tom Hudson
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -59,7 +59,7 @@ func TestLinkMethods(t *testing.T) {
t.Errorf("Link should have param pet=\"cat\"")
}
val, err = link.Param("foo")
_, err = link.Param("foo")
if err == nil {
t.Errorf("Error value should not be nil")
}

6
script/bootstrap Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
PROJDIR=$(cd `dirname $0`/.. && pwd)
echo "Installing gometalinter and linters..."
go get github.com/alecthomas/gometalinter
gometalinter --install

4
script/lint Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
PROJDIR=$(cd `dirname $0`/.. && pwd)
cd ${PROJDIR} && gometalinter

3
script/test Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
PROJDIR=$(cd `dirname $0`/.. && pwd)
cd $PROJDIR && go test