rpaste/modules/utility/parsers.go

30 lines
396 B
Go
Raw Normal View History

2021-12-24 09:01:22 +00:00
// parser area
package utility
import (
_ "errors"
"os"
_ "path"
_ "path/filepath"
_ "strings"
)
func StdInChecker() bool {
// This is hacky
data, _ := os.Stdin.Stat()
if (data.Mode() & os.ModeCharDevice) == 0 {
return true
} else {
return false
}
}
2022-01-02 17:03:04 +00:00
func stringInSlice(s string, list []string) bool {
for _, b := range list {
if b == s {
return true
}
}
return false
}