rpaste/modules/utility/parsers.go
nazunalika 6ede82b418
fixes
2022-01-02 10:03:04 -07:00

29 lines
396 B
Go

// 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
}
}
func stringInSlice(s string, list []string) bool {
for _, b := range list {
if b == s {
return true
}
}
return false
}