rpaste/modules/utility/parsers.go

30 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
}