mirror of
https://github.com/adnanh/webhook.git
synced 2025-10-04 21:51:02 +00:00
chore: go mod vendor
This commit is contained in:
parent
f93670d9ae
commit
90fdae322f
429 changed files with 88019 additions and 123699 deletions
8
vendor/github.com/go-chi/chi/middleware/terminal.go
generated
vendored
8
vendor/github.com/go-chi/chi/middleware/terminal.go
generated
vendored
|
@ -32,7 +32,7 @@ var (
|
|||
reset = []byte{'\033', '[', '0', 'm'}
|
||||
)
|
||||
|
||||
var isTTY bool
|
||||
var IsTTY bool
|
||||
|
||||
func init() {
|
||||
// This is sort of cheating: if stdout is a character device, we assume
|
||||
|
@ -47,17 +47,17 @@ func init() {
|
|||
fi, err := os.Stdout.Stat()
|
||||
if err == nil {
|
||||
m := os.ModeDevice | os.ModeCharDevice
|
||||
isTTY = fi.Mode()&m == m
|
||||
IsTTY = fi.Mode()&m == m
|
||||
}
|
||||
}
|
||||
|
||||
// colorWrite
|
||||
func cW(w io.Writer, useColor bool, color []byte, s string, args ...interface{}) {
|
||||
if isTTY && useColor {
|
||||
if IsTTY && useColor {
|
||||
w.Write(color)
|
||||
}
|
||||
fmt.Fprintf(w, s, args...)
|
||||
if isTTY && useColor {
|
||||
if IsTTY && useColor {
|
||||
w.Write(reset)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue