[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. // Set default Architecture Dockerfile to amd64.
dockerfile := "Dockerfile" dockerfile := "Dockerfile"
// Set version of QEMU. // Set version of QEMU.
qemuversion := "v5.0.0-2" qemuversion := "v5.1.0-2"
// If not the default value. // If not the default value.
if arch != defaultArch { if arch != defaultArch {

View File

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

View File

@ -20,17 +20,17 @@ func WithDatabase(content []byte, f func(path string)) {
log.Fatal(err) log.Fatal(err)
} }
defer os.Remove(tmpfile.Name()) // clean up defer os.Remove(tmpfile.Name()) // Clean up
if _, err := tmpfile.Write(content); err != nil { if _, err := tmpfile.Write(content); err != nil {
tmpfile.Close() tmpfile.Close()
log.Fatal(err) log.Panic(err)
} }
f(tmpfile.Name()) f(tmpfile.Name())
if err := tmpfile.Close(); err != nil { 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 { if err != nil {
validator.Push(fmt.Errorf("error loading secret file (%s): %s", name, err)) validator.Push(fmt.Errorf("error loading secret file (%s): %s", name, err))
} else { } 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) { func TestShouldGetAddedUserGroupsFromBackend(t *testing.T) {
mock := mocks.NewMockAutheliaCtx(t) mock := mocks.NewMockAutheliaCtx(t)
//defer mock.Close()
// Setup pointer to john so we can adjust it during the test. // Setup pointer to john so we can adjust it during the test.
user := &authentication.UserDetails{ user := &authentication.UserDetails{