[CI] Update QEMU to v5.1.0-2 (#1321)

* [CI] Update QEMU to v5.1.0-2

* Fix linter errors from golangci-lint update
pull/1320/head
Amir Zarrinkafsh 2020-09-18 22:05:43 +10:00 committed by GitHub
parent ed5e72508d
commit b1a01b1727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 10 deletions

View File

@ -46,7 +46,7 @@ func dockerBuildOfficialImage(arch string) error {
// Set default Architecture Dockerfile to amd64.
dockerfile := "Dockerfile"
// Set version of QEMU.
qemuversion := "v5.0.0-2"
qemuversion := "v5.1.0-2"
// If not the default value.
if arch != defaultArch {

View File

@ -1,5 +1,5 @@
//usr/bin/env go run "$0" "$@"; exit
//nolint:godot
//nolint:gocritic,godot
package main

View File

@ -20,17 +20,17 @@ func WithDatabase(content []byte, f func(path string)) {
log.Fatal(err)
}
defer os.Remove(tmpfile.Name()) // clean up
defer os.Remove(tmpfile.Name()) // Clean up
if _, err := tmpfile.Write(content); err != nil {
tmpfile.Close()
log.Fatal(err)
log.Panic(err)
}
f(tmpfile.Name())
if err := tmpfile.Close(); err != nil {
log.Fatal(err)
log.Panic(err)
}
}

View File

@ -55,7 +55,7 @@ func getSecretValue(name string, validator *schema.StructValidator, viper *viper
if err != nil {
validator.Push(fmt.Errorf("error loading secret file (%s): %s", name, err))
} else {
return strings.Replace(string(content), "\n", "", -1)
return strings.ReplaceAll(string(content), "\n", "")
}
}

View File

@ -913,7 +913,6 @@ func TestShouldGetRemovedUserGroupsFromBackend(t *testing.T) {
func TestShouldGetAddedUserGroupsFromBackend(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t)
//defer mock.Close()
// Setup pointer to john so we can adjust it during the test.
user := &authentication.UserDetails{