mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-01-27 09:37:13 +08:00
tests: avoid sprint for simple string concatination
This commit is contained in:
parent
f57a556af4
commit
14753257fb
2 changed files with 3 additions and 2 deletions
|
|
@ -4,6 +4,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
|
|
@ -13,7 +14,7 @@ import (
|
|||
func RuntimeDir() (string, error) {
|
||||
rundir, ok := os.LookupEnv("XDG_RUNTIME_DIR")
|
||||
if !ok {
|
||||
return "", fmt.Errorf("$XDG_RUNTIME_DIR is not set")
|
||||
return "", errors.New("$XDG_RUNTIME_DIR is not set")
|
||||
}
|
||||
return rundir, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ func TestGPG(t *testing.T) { //nolint:paralleltest
|
|||
testdir := newTestDir(t)
|
||||
defer testdir.Remove()
|
||||
gpgHome := path.Join(testdir.path, "gpg-home")
|
||||
gpgEnv := append(os.Environ(), fmt.Sprintf("GNUPGHOME=%s", gpgHome))
|
||||
gpgEnv := append(os.Environ(), "GNUPGHOME="+gpgHome)
|
||||
|
||||
ok(t, os.Mkdir(gpgHome, os.FileMode(0o700)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue