mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
remove an unused error, and move stuff around
This commit is contained in:
parent
3f2be2c877
commit
ad19096c23
23
cli.go
23
cli.go
|
|
@ -1,23 +0,0 @@
|
|||
package peco
|
||||
|
||||
import "errors"
|
||||
|
||||
var ErrSignalReceived = errors.New("received signal")
|
||||
|
||||
// BufferSize returns the specified buffer size. Fulfills CtxOptions
|
||||
func (o CLIOptions) BufferSize() int {
|
||||
return o.OptBufferSize
|
||||
}
|
||||
|
||||
// EnableNullSep returns true if --null was specified. Fulfills CtxOptions
|
||||
func (o CLIOptions) EnableNullSep() bool {
|
||||
return o.OptEnableNullSep
|
||||
}
|
||||
|
||||
func (o CLIOptions) InitialIndex() int {
|
||||
return o.OptInitialIndex
|
||||
}
|
||||
|
||||
func (o CLIOptions) LayoutType() string {
|
||||
return o.OptLayout
|
||||
}
|
||||
17
options.go
17
options.go
|
|
@ -10,6 +10,23 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// BufferSize returns the specified buffer size. Fulfills CtxOptions
|
||||
func (o CLIOptions) BufferSize() int {
|
||||
return o.OptBufferSize
|
||||
}
|
||||
|
||||
// EnableNullSep returns true if --null was specified. Fulfills CtxOptions
|
||||
func (o CLIOptions) EnableNullSep() bool {
|
||||
return o.OptEnableNullSep
|
||||
}
|
||||
|
||||
func (o CLIOptions) InitialIndex() int {
|
||||
return o.OptInitialIndex
|
||||
}
|
||||
|
||||
func (o CLIOptions) LayoutType() string {
|
||||
return o.OptLayout
|
||||
}
|
||||
func (options *CLIOptions) parse(s []string) ([]string, error) {
|
||||
p := flags.NewParser(options, flags.PrintErrors)
|
||||
args, err := p.ParseArgs(s)
|
||||
|
|
|
|||
Loading…
Reference in a new issue