don't use named returns

This commit is contained in:
Jörg Thalheim 2024-11-20 09:44:56 +01:00
parent fc20a8fdf9
commit 1f66022025

View file

@ -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 {