diff options
| author | ewy <ewy0@protonmail.com> | 2026-06-06 20:20:41 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-06-06 20:20:41 +0200 |
| commit | fc9d57a500e522ce254f34681c67c6b2f3300cd8 (patch) | |
| tree | 101a9993e10c981a040f8321908e81e92371bbbd /completion/completion.go | |
| parent | a51c16ec4a1470549e3070d62a71386ea1aa5431 (diff) | |
remove a bunch of unnecessary pointer manip
Diffstat (limited to 'completion/completion.go')
| -rw-r--r-- | completion/completion.go | 12 |
1 files changed, 6 insertions, 6 deletions
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 } |
