owncast/utils.go

26 lines
340 B
Go
Raw Normal View History

2020-05-30 03:08:33 +02:00
package main
import (
"os"
"path/filepath"
2020-05-30 03:08:33 +02:00
)
func getTempPipePath() string {
return filepath.Join(os.TempDir(), "streampipe.flv")
}
2020-06-02 01:53:31 +02:00
func fileExists(name string) bool {
if _, err := os.Stat(name); err != nil {
if os.IsNotExist(err) {
return false
}
}
return true
}
2020-06-04 08:53:39 +02:00
func verifyError(e error) {
if e != nil {
panic(e)
}
}