File: exit.go

package info (click to toggle)
golang-github-pterm-pterm 0.12.79-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,640 kB
  • sloc: makefile: 4
file content (14 lines) | stat: -rw-r--r-- 327 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package internal

import "os"

// ExitFuncType is the type of function used to exit the program.
type ExitFuncType func(int)

// DefaultExitFunc is the default function used to exit the program.
var DefaultExitFunc ExitFuncType = os.Exit

// Exit calls the current exit function.
func Exit(code int) {
	DefaultExitFunc(code)
}