projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18947: Refactor keep-web as arvados-server command.
[arvados.git]
/
lib
/
cmd
/
cmd.go
diff --git
a/lib/cmd/cmd.go
b/lib/cmd/cmd.go
index b7d918739b86de347b0960e785bbd27dea477fba..a03cb90f68e6cd84ee0e9091971af7370f0ee7db 100644
(file)
--- a/
lib/cmd/cmd.go
+++ b/
lib/cmd/cmd.go
@@
-16,6
+16,8
@@
import (
"runtime"
"sort"
"strings"
"runtime"
"sort"
"strings"
+
+ "github.com/sirupsen/logrus"
)
type Handler interface {
)
type Handler interface {
@@
-58,7
+60,7
@@
func (versionCommand) RunCommand(prog string, args []string, stdin io.Reader, st
// fmt.Println(args[0])
// return 2
// }),
// fmt.Println(args[0])
// return 2
// }),
-// })("/usr/bin/multi", []string{"foobar", "baz"}))
+// })("/usr/bin/multi", []string{"foobar", "baz"}
, os.Stdin, os.Stdout, os.Stderr
))
//
// ...prints "baz" and exits 2.
type Multi map[string]Handler
//
// ...prints "baz" and exits 2.
type Multi map[string]Handler
@@
-153,3
+155,9
@@
func SubcommandToFront(args []string, flagset FlagSet) []string {
copy(newargs[flagargs+1:], args[flagargs+1:])
return newargs
}
copy(newargs[flagargs+1:], args[flagargs+1:])
return newargs
}
+
+type NoPrefixFormatter struct{}
+
+func (NoPrefixFormatter) Format(entry *logrus.Entry) ([]byte, error) {
+ return []byte(entry.Message + "\n"), nil
+}