From dfedb3f9d196740eba7f33be28fa13a5210697d7 Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Fri, 17 Jun 2016 14:15:37 +0900 Subject: [PATCH] Remove unused code --- interface.go | 20 -------------------- options.go | 4 ++-- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/interface.go b/interface.go index 9003d4c..990d2e8 100644 --- a/interface.go +++ b/interface.go @@ -353,26 +353,6 @@ type Style struct { bg termbox.Attribute } -// CtxOptions is the interface that defines that options can be -// passed in from the command line -type CtxOptions interface { - // EnableNullSep should return if the null separator is - // enabled (--null) - EnableNullSep() bool - - // BufferSize should return the buffer size. By default (i.e. - // when it returns 0), the buffer size is unlimited. - // (--buffer-size) - BufferSize() int - - // InitialIndex is the line number to put the cursor on - // when peco starts - InitialIndex() int - - // LayoutType returns the name of the layout to use - LayoutType() string -} - type Location struct { col int lineno int diff --git a/options.go b/options.go index e32efd6..927c986 100644 --- a/options.go +++ b/options.go @@ -10,12 +10,12 @@ import ( "github.com/pkg/errors" ) -// BufferSize returns the specified buffer size. Fulfills CtxOptions +// BufferSize returns the specified buffer size. func (o CLIOptions) BufferSize() int { return o.OptBufferSize } -// EnableNullSep returns true if --null was specified. Fulfills CtxOptions +// EnableNullSep returns true if --null was specified. func (o CLIOptions) EnableNullSep() bool { return o.OptEnableNullSep }