restart

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 11 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 restart starts a desktop app again once it has exited, for desktop.Restart, and keeps an app that restarts as it launches from doing so forever.

Index

Constants

View Source
const LoopWindow = 10 * time.Second

LoopWindow is how soon after a restart another restart counts as a loop.

Variables

This section is empty.

Functions

func Await

func Await()

Await only marks a restarted process (Looping): Start's shell waits instead.

func Looping

func Looping() bool

Looping says whether this process, started by Start, is restarting again within LoopWindow of its start: an app restarting itself as it launches gets one visible refusal instead of chaining forever, while a restart the user asks for later still runs.

func Start

func Start(args []string) error

Start starts the program again with args once this process has exited, through a shell that waits for it at most 10 seconds: a macOS app in a bundle through Launch Services, as the user opens it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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