Help us shape the future of Go! Take the 2026 Go Developer Survey

stop

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

README

stop

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exit

func Exit()

Exit calls os.Exit with stored non-zero global status.

func Status

func Status() int

Status returns current exit status.

Example
package main

import (
	"fmt"

	"github.com/ninedraft/stop"
)

func main() {
	defer fmt.Println("never be printed")
	defer stop.Exit()
	defer fmt.Println("will be printed")

	stop.Stop(1)
}

func Stop

func Stop(status int)

Stop sets global exit status and exits current goroutine with runtime.Goexit().

Types

This section is empty.

Jump to

Keyboard shortcuts

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