mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-01-09 15:12:36 +08:00
don't use named returns
This commit is contained in:
parent
fc20a8fdf9
commit
1f66022025
1 changed files with 3 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue