vendor: update github.com/rjeczalik/notify for go1.10 (#15785)

This commit is contained in:
Péter Szilágyi
2018-01-02 12:41:47 +02:00
committed by Felix Lange
parent 3e0113fff4
commit d2533d0efb
20 changed files with 229 additions and 158 deletions

View File

@ -6,38 +6,4 @@
package notify
import (
"fmt"
"os"
"runtime"
"strings"
)
func dbgprint(v ...interface{}) {
fmt.Printf("[D] ")
fmt.Print(v...)
fmt.Printf("\n\n")
}
func dbgprintf(format string, v ...interface{}) {
fmt.Printf("[D] ")
fmt.Printf(format, v...)
fmt.Printf("\n\n")
}
func dbgcallstack(max int) []string {
pc, stack := make([]uintptr, max), make([]string, 0, max)
runtime.Callers(2, pc)
for _, pc := range pc {
if f := runtime.FuncForPC(pc); f != nil {
fname := f.Name()
idx := strings.LastIndex(fname, string(os.PathSeparator))
if idx != -1 {
stack = append(stack, fname[idx+1:])
} else {
stack = append(stack, fname)
}
}
}
return stack
}
var debugTag bool = true