mirror of
https://github.com/stashapp/stash.git
synced 2025-12-10 20:36:45 -06:00
* Changes to support custom URL paths * Refactor image resolver code * Initialise box files at startup * Update packr Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
20 lines
233 B
Go
20 lines
233 B
Go
// +build !appengine
|
|
|
|
package logger
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
|
|
"golang.org/x/term"
|
|
)
|
|
|
|
func checkIfTerminal(w io.Writer) bool {
|
|
switch v := w.(type) {
|
|
case *os.File:
|
|
return term.IsTerminal(int(v.Fd()))
|
|
default:
|
|
return false
|
|
}
|
|
}
|