update

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package update replaces the running binary with the latest published release, using the same installer the website serves.

Index

Constants

View Source
const ScriptURL = "https://www.postline.dev/install.sh"

ScriptURL is the installer on postline.dev. The site proxies the copy in the repository, so a push to install.sh is what this command runs.

Variables

This section is empty.

Functions

func AlreadyCurrent

func AlreadyCurrent(installed, latest string) bool

AlreadyCurrent reports whether the installed binary is the published tag. A "dev" build is never current: it was produced without a release.

func ArchiveName

func ArchiveName(goos, goarch, version string) string

ArchiveName is the GoReleaser artifact for a given OS, arch, and version number (no leading v).

func DirOf

func DirOf(executable string) string

DirOf is the directory a binary lives in, which is where --update writes.

func Normalize

func Normalize(v string) string

Normalize strips a leading v so "v0.1.0" and "0.1.0" compare equal.

func Run

func Run(installedVersion string) error

Run downloads the website installer and points it at the directory of the current executable, so the replacement lands on top of this binary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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