From 116848674014f79183880a000eef6fa62e136151 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Thu, 8 Sep 2016 10:49:04 +0800 Subject: [PATCH] remove useless file --- README.md | 2 +- broadcast.go | 24 ++++++++++++------------ fsm.go | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 3afba6b..c9bbeb2 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Open web to see the manager page. ![gosuv web](docs/gosuv.gif) ## Configuration -Default config file stored in directory `$HOME/.gosuv/` +Default config file stored in directory `$HOME/.gosuv/`, Set env-var `GOSUV_HOME_DIR` can change config file store directory. - file `programs.yml` contains all program settings. - file `config.yml` contains server config diff --git a/broadcast.go b/broadcast.go index 5a8f7f3..3e61c16 100644 --- a/broadcast.go +++ b/broadcast.go @@ -103,22 +103,22 @@ func (w *WriteBroadcaster) CloseWriters() error { return nil } -// nop writer -type NopWriter struct{} +// // nop writer +// type NopWriter struct{} -func (*NopWriter) Write(buf []byte) (int, error) { - return len(buf), nil -} +// func (*NopWriter) Write(buf []byte) (int, error) { +// return len(buf), nil +// } -type nopWriteCloser struct { - io.Writer -} +// type nopWriteCloser struct { +// io.Writer +// } -func (w *nopWriteCloser) Close() error { return nil } +// func (w *nopWriteCloser) Close() error { return nil } -func NopWriteCloser(w io.Writer) io.WriteCloser { - return &nopWriteCloser{w} -} +// func NopWriteCloser(w io.Writer) io.WriteCloser { +// return &nopWriteCloser{w} +// } // chan string writer type chanStrWriter struct { diff --git a/fsm.go b/fsm.go index 5fcb942..8629adf 100644 --- a/fsm.go +++ b/fsm.go @@ -271,9 +271,9 @@ func NewProcess(pg Program) *Process { stopC: make(chan syscall.Signal), retryLeft: pg.StartRetries, Status: string(Stopped), - Output: NewQuickLossBroadcastWriter(outputBufferSize), // NewBufferBroadcast(outputBufferSize), - Stdout: NewQuickLossBroadcastWriter(outputBufferSize), // NewBufferBroadcast(outputBufferSize), - Stderr: NewQuickLossBroadcastWriter(outputBufferSize), // NewBufferBroadcast(outputBufferSize), + Output: NewQuickLossBroadcastWriter(outputBufferSize), + Stdout: NewQuickLossBroadcastWriter(outputBufferSize), + Stderr: NewQuickLossBroadcastWriter(outputBufferSize), } pr.StateChange = func(_, newStatus FSMState) { pr.Status = string(newStatus)