Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckWritable ¶
CheckWritable verifies that the running process can replace the binary at targetPath by probing the parent directory. os.Rename only requires write permission on the parent directory, not on the target file itself.
func ResolveExecutable ¶
ResolveExecutable returns the path of the current binary with symlinks resolved. Callers use the resolved path consistently for permission checks, user-facing messages, and the rename target.
func SelfReplace ¶
SelfReplace downloads the release asset for the given tag and replaces the binary at targetPath in place. Only supported on linux and darwin. Callers should resolve symlinks before invoking so the rename targets the real binary.
Types ¶
Click to show internal directories.
Click to hide internal directories.