diff --git a/README.md b/README.md index 173ec2aa..410294f4 100644 --- a/README.md +++ b/README.md @@ -251,8 +251,7 @@ Flags: --version print version Args: - [] path to a config file. The default is rtsp-simple-server.yml. Use 'stdin' to - read config from stdin + [] path to a config file. The default is rtsp-simple-server.yml. ``` ### Compile and run from source diff --git a/main.go b/main.go index dda58547..d045bb79 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "io" "log" "net" "os" @@ -59,7 +58,7 @@ type program struct { done chan struct{} } -func newProgram(args []string, stdin io.Reader) (*program, error) { +func newProgram(args []string) (*program, error) { k := kingpin.New("rtsp-simple-server", "rtsp-simple-server "+Version+"\n\nRTSP server.") @@ -399,7 +398,7 @@ func (p *program) close() { } func main() { - _, err := newProgram(os.Args[1:], os.Stdin) + _, err := newProgram(os.Args[1:]) if err != nil { log.Fatal("ERR: ", err) } diff --git a/main_test.go b/main_test.go index 602994a3..fca27cee 100644 --- a/main_test.go +++ b/main_test.go @@ -103,7 +103,7 @@ func (c *container) ip() string { func testProgram(conf string) (*program, error) { if conf == "" { - return newProgram([]string{}, nil) + return newProgram([]string{}) } tmpf, err := ioutil.TempFile(os.TempDir(), "rtsp-") @@ -115,7 +115,7 @@ func testProgram(conf string) (*program, error) { tmpf.WriteString(conf) tmpf.Close() - return newProgram([]string{tmpf.Name()}, nil) + return newProgram([]string{tmpf.Name()}) } func TestEnvironment(t *testing.T) {