mirror of
https://codeberg.org/librarian/feeds
synced 2024-12-06 19:16:24 +01:00
Merge pull request #29 from gorilla/update-travis-yml
[ci] Run go vet, gofmt and the race detector during tests.
This commit is contained in:
+7
-1
@@ -1,8 +1,14 @@
|
||||
language: go
|
||||
sudo: false
|
||||
|
||||
go:
|
||||
- 1.3
|
||||
- 1.4
|
||||
- 1.5
|
||||
- tip
|
||||
install:
|
||||
- go get golang.org/x/tools/cmd/vet
|
||||
script:
|
||||
- go get -t -v ./...
|
||||
- diff -u <(echo -n) <(gofmt -d -s .)
|
||||
- go tool vet .
|
||||
- go test -v -race ./...
|
||||
|
||||
+6
-7
@@ -119,38 +119,37 @@ func TestFeed(t *testing.T) {
|
||||
}
|
||||
|
||||
feed.Items = []*Item{
|
||||
&Item{
|
||||
{
|
||||
Title: "Limiting Concurrency in Go",
|
||||
Link: &Link{Href: "http://jmoiron.net/blog/limiting-concurrency-in-go/"},
|
||||
Description: "A discussion on controlled parallelism in golang",
|
||||
Author: &Author{"Jason Moiron", "jmoiron@jmoiron.net"},
|
||||
Created: now,
|
||||
},
|
||||
&Item{
|
||||
{
|
||||
Title: "Logic-less Template Redux",
|
||||
Link: &Link{Href: "http://jmoiron.net/blog/logicless-template-redux/"},
|
||||
Description: "More thoughts on logicless templates",
|
||||
Created: now,
|
||||
},
|
||||
&Item{
|
||||
{
|
||||
Title: "Idiomatic Code Reuse in Go",
|
||||
Link: &Link{Href: "http://jmoiron.net/blog/idiomatic-code-reuse-in-go/"},
|
||||
Description: "How to use interfaces <em>effectively</em>",
|
||||
Created: now,
|
||||
},
|
||||
&Item{
|
||||
{
|
||||
Title: "Never Gonna Give You Up Mp3",
|
||||
Link: &Link{Href: "http://example.com/RickRoll.mp3", Length: "123456", Type: "audio/mpeg"},
|
||||
Description: "Never gonna give you up - Never gonna let you down.",
|
||||
Created: now,
|
||||
},
|
||||
&Item{
|
||||
{
|
||||
Title: "String formatting in Go",
|
||||
Link: &Link{Href: "http://example.com/strings"},
|
||||
Description: "How to use things like %s, %v, %d, etc.",
|
||||
Created: now,
|
||||
},
|
||||
}
|
||||
}}
|
||||
|
||||
atom, err := feed.ToAtom()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user