From 1f6602202558cb2ff27c322942920a70e6f42926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 20 Nov 2024 09:44:56 +0100 Subject: [PATCH] don't use named returns --- pkgs/sops-install-secrets/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/sops-install-secrets/main.go b/pkgs/sops-install-secrets/main.go index b086d93..722b8ae 100644 --- a/pkgs/sops-install-secrets/main.go +++ b/pkgs/sops-install-secrets/main.go @@ -1276,9 +1276,10 @@ func parseFlags(args []string) (*options, error) { return &opts, nil } -func replaceRuntimeDir(path, rundir string) (ret string) { +func replaceRuntimeDir(path, rundir string) string { parts := strings.Split(path, "%%") first := true + ret := "" for _, part := range parts { if !first { @@ -1289,7 +1290,7 @@ func replaceRuntimeDir(path, rundir string) (ret string) { ret += strings.ReplaceAll(part, "%r", rundir) } - return + return ret } func writeTemplates(targetDir string, templates []template, keysGID int, userMode bool) error {