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 /modes.go | |
| parent | a51c16ec4a1470549e3070d62a71386ea1aa5431 (diff) | |
remove a bunch of unnecessary pointer manip
Diffstat (limited to 'modes.go')
| -rw-r--r-- | modes.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -45,14 +45,14 @@ var profileFd *os.File var uninitializedModes = ModeMap[func() *spool.ExitCode]{ flags.Version: func() *spool.ExitCode { _, _ = spool.Print("%s\n", version) - return &spool.Success + return spool.Success }, flags.Completion: func() *spool.ExitCode { return completion.Echo() }, flags.Help: func() *spool.ExitCode { _ = manview.View(help) - return &spool.Success + return spool.Success }, } @@ -62,7 +62,7 @@ var statelessModes = ModeMap[func() *spool.ExitCode]{ flags.InstallCompletion: func() *spool.ExitCode { sh := os.Getenv("SHELL") if sh == "" { - return &spool.UnknownShellFailure + return spool.UnknownShellFailure } _, sh = filepath.Split(sh) return completion.Add(sh) @@ -70,12 +70,12 @@ var statelessModes = ModeMap[func() *spool.ExitCode]{ flags.Profile: func() *spool.ExitCode { fd, err := os.Create("pik-profile.out") if err != nil { - return &spool.ProfilingFailure + return spool.ProfilingFailure } runtime.SetCPUProfileRate(1000) err = pprof.StartCPUProfile(profileFd) if err != nil { - return &spool.ProfilingFailure + return spool.ProfilingFailure } profileFd = fd return nil @@ -96,9 +96,9 @@ var statefulModes = ModeMap[func(st *model.State) *spool.ExitCode]{ } if count == 0 { - return &spool.NoTargetsFailure + return spool.NoTargetsFailure } - return &spool.Success + return spool.Success }, } |
