add some go-critic suggestions

This commit is contained in:
sentriz
2020-05-07 04:31:47 +01:00
parent 803a5babff
commit c65606ba1f
7 changed files with 22 additions and 22 deletions

View File

@@ -53,7 +53,7 @@ func runQueryCases(t *testing.T, h handlerSubsonic, cases []*queryCase) {
// convert test name to query case path
snake := testCamelExpr.ReplaceAllString(t.Name(), "${1}_${2}")
lower := strings.ToLower(snake)
relPath := strings.Replace(lower, "/", "_", -1)
relPath := strings.ReplaceAll(lower, "/", "_")
absExpPath := path.Join(testDataDir, relPath)
// read case to differ with handler result
expected, err := jd.ReadJsonFile(absExpPath)