Use gometalinter (#210)
* Remove unused struct field * Ignore unused test data * Remove unused variables * Remove deadcode * Fix up vetshadow warnings * Convert to using gometalinter * Update travis * Use vendored versions of gometalinter * Make gometalinter install its stuff * Vendor misspell
This commit is contained in:
parent
a26d7c2899
commit
2dcb3a11a5
12 changed files with 48 additions and 63 deletions
|
|
@ -221,14 +221,14 @@ func testRoomserver(input []string, wantOutput []string, checkQueries func(api.R
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := test.WriteConfig(cfg, dir); err != nil {
|
||||
if err = test.WriteConfig(cfg, dir); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
outputTopic := string(cfg.Kafka.Topics.OutputRoomEvent)
|
||||
|
||||
exe.DeleteTopic(outputTopic)
|
||||
if err := exe.CreateTopic(outputTopic); err != nil {
|
||||
if err = exe.CreateTopic(outputTopic); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
|
@ -271,17 +271,6 @@ func testRoomserver(input []string, wantOutput []string, checkQueries func(api.R
|
|||
}
|
||||
}
|
||||
|
||||
func canonicalJSONInput(jsonData []string) []string {
|
||||
for i := range jsonData {
|
||||
jsonBytes, err := gomatrixserverlib.CanonicalJSON([]byte(jsonData[i]))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
jsonData[i] = string(jsonBytes)
|
||||
}
|
||||
return jsonData
|
||||
}
|
||||
|
||||
func equalJSON(a, b string) bool {
|
||||
canonicalA, err := gomatrixserverlib.CanonicalJSON([]byte(a))
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue