selfcmd

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package selfcmd implements the `self install|update|uninstall|doctor` builtins: the CLI-facing layer over internal/selfupdate. It builds a selfupdate.Config from the invocation environment (the shared HTTP client, clock, program environment, and — for install — a /dev/tty PATH confirm), dispatches, and renders the result structs; all file/network mechanics live in internal/selfupdate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cx *clienv.Cmd, c *spec.Command, cmd *cobra.Command, args []string) error

Run dispatches the `self …` builtins.

func StdinConfirmer

func StdinConfirmer(w io.Writer) clienv.Confirm

StdinConfirmer returns a clienv.Confirm backed by the process stdin, or nil when stdin is not a terminal. Unlike the install prompt it does NOT use /dev/tty: `self uninstall` is invoked directly (never piped like the install script), so its stdin IS the terminal — and reading stdin also works on Windows, where /dev/tty does not exist. A nil return is how the caller detects "not interactive" and refuses to run. Questions are written to w (stderr).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL