From fc9d57a500e522ce254f34681c67c6b2f3300cd8 Mon Sep 17 00:00:00 2001 From: ewy Date: Sat, 6 Jun 2026 20:20:41 +0200 Subject: remove a bunch of unnecessary pointer manip --- completion/completion.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'completion') diff --git a/completion/completion.go b/completion/completion.go index 6fa6814..89252ba 100644 --- a/completion/completion.go +++ b/completion/completion.go @@ -39,22 +39,22 @@ func Add(shell string) *spool.ExitCode { f := filepath.Join(paths.HomeDir.String(), completionFileByShell[shell]) content, err := os.ReadFile(f) if err != nil { - return &spool.FatalReadFailure + return spool.FatalReadFailure } if strings.Contains(string(content), strings.TrimSpace(completionCodeByShell[shell])) { - return &spool.CompletionAlreadyInstalledFailure + return spool.CompletionAlreadyInstalledFailure } fd, err := os.OpenFile(f, os.O_APPEND|os.O_WRONLY, 0600) defer fd.Close() if err != nil { - return &spool.FatalReadFailure + return spool.FatalReadFailure } _, err = fd.Write([]byte(fmt.Sprintf(completionFormat, completionComment, completionCodeByShell[shell]))) if err != nil { - return &spool.CompletionFailure + return spool.CompletionFailure } successMessage(shell, f) - return &spool.Success + return spool.Success } func successMessage(shell string, file string) { @@ -65,5 +65,5 @@ func successMessage(shell string, file string) { // because it is baked in with the program it should always be version-appropriate func Echo() *spool.ExitCode { _, _ = spool.Print("%s", completionCode) - return &spool.Success + return spool.Success } -- cgit v1.3.1