Skip to content

Commit d21df75

Browse files
committed
fix command missing behavior
1 parent 54eb44c commit d21df75

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

cmd/pythonbrew/pythonbrew.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func run() error {
4545

4646
c, err := subcmd.Repository().Find(os.Args[1])
4747
if err != nil {
48-
return err
48+
return subcmd.NewHelp().Run(nil)
4949
}
5050
return c.Run(os.Args[1:])
5151
}

log/log.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
type (
15-
// Logger is a interface that output log.
15+
// Logger is a logging interface.
1616
Logger interface {
1717
Progressf(format string, args ...interface{})
1818
Printf(format string, args ...interface{})
@@ -33,26 +33,26 @@ var (
3333
colorableStderr = colorable.NewColorableStderr()
3434
)
3535

36-
// NewLogger returns a logger
36+
// NewLogger returns a logger.
3737
func NewLogger() Logger {
3838
return &logger{
3939
w: ioutil.Discard,
4040
}
4141
}
4242

43-
// NewFileLogger returns a logger with file writer
43+
// NewFileLogger returns a logger with file writer.
4444
func NewFileLogger() Logger {
4545
return &logger{
4646
w: cronowriter.MustNew(path.Log()),
4747
}
4848
}
4949

50-
// Progressf is a function to standard output progressive.
50+
// Progressf is a function that writes string to standard output in a fixed position.
5151
func (l *logger) Progressf(format string, args ...interface{}) {
5252
fmt.Fprintf(colorableStdout, "\r\033[K%s", color.GreenString(format, args...))
5353
}
5454

55-
// Printf is a function to standard output.
55+
// Printf is a function that writes string to standard output.
5656
func (l *logger) Printf(format string, args ...interface{}) {
5757
fmt.Fprintln(colorableStdout, fmt.Sprintf(format, args...))
5858
}

0 commit comments

Comments
 (0)