aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Passos <rafael@rcpassos.me>2018-10-24 18:27:43 -0300
committerRafael Passos <rafael@rcpassos.me>2018-10-24 18:27:43 -0300
commit4f4af4584f21f294cb77b4adbd4a2ae054b49be9 (patch)
treef23f95eceaf790f8f56cf504b57e7441fb71c63b
parent3fa967336077bdd5a3ee1de8d9c91235e498ef7b (diff)
downloadgit-bug-4f4af4584f21f294cb77b4adbd4a2ae054b49be9.tar.gz
changing t type where used
-rw-r--r--cleaner/cleaner.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cleaner/cleaner.go b/cleaner/cleaner.go
index 70d3d5e8..595c9fb0 100644
--- a/cleaner/cleaner.go
+++ b/cleaner/cleaner.go
@@ -9,11 +9,11 @@ import (
type Cleaner func() error
-var cleaners []t
+var cleaners []Cleaner
var inactive bool
// Register a cleaner function. When a function is registered, the Signal watcher is started in a goroutine.
-func Register(f t) {
+func Register(f Cleaner) {
cleaners = append(cleaners, f)
if !inactive {
inactive = false
@@ -21,7 +21,7 @@ func Register(f t) {
ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
<-ch
- // Prevent un-terminated ^C character in terminal
+ // Prevent un-terminated ^C character in terminal
fmt.Println()
clean()
os.Exit(1)
@@ -35,5 +35,5 @@ func clean() {
for _, f := range cleaners {
_ = f()
}
- cleaners = []t{}
+ cleaners = []Cleaner{}
}