Adds gotemplate files
This commit is contained in:
parent
3cbc5e2ab0
commit
a34f4bd376
|
@ -5,4 +5,12 @@ go:
|
||||||
- 1.3
|
- 1.3
|
||||||
- 1.4
|
- 1.4
|
||||||
- 1.5
|
- 1.5
|
||||||
|
- 1.6
|
||||||
- tip
|
- tip
|
||||||
|
|
||||||
|
install:
|
||||||
|
- ./script/bootstrap
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./script/test
|
||||||
|
- ./script/lint
|
||||||
|
|
10
CONTRIBUTING.mkd
Normal file
10
CONTRIBUTING.mkd
Normal 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
27
LICENSE
|
@ -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"),
|
Copyright (c) 2016 Tom Hudson
|
||||||
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 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,
|
The above copyright notice and this permission notice shall be included in all
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
copies or substantial portions of the Software.
|
||||||
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 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.
|
||||||
|
|
|
@ -59,7 +59,7 @@ func TestLinkMethods(t *testing.T) {
|
||||||
t.Errorf("Link should have param pet=\"cat\"")
|
t.Errorf("Link should have param pet=\"cat\"")
|
||||||
}
|
}
|
||||||
|
|
||||||
val, err = link.Param("foo")
|
_, err = link.Param("foo")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("Error value should not be nil")
|
t.Errorf("Error value should not be nil")
|
||||||
}
|
}
|
||||||
|
|
6
script/bootstrap
Executable file
6
script/bootstrap
Executable 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
4
script/lint
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
PROJDIR=$(cd `dirname $0`/.. && pwd)
|
||||||
|
|
||||||
|
cd ${PROJDIR} && gometalinter
|
3
script/test
Executable file
3
script/test
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
PROJDIR=$(cd `dirname $0`/.. && pwd)
|
||||||
|
cd $PROJDIR && go test
|
Loading…
Reference in New Issue
Block a user