all: purge redundant underscores

Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
This commit is contained in:
Wagner Riffel 2019-09-03 16:34:03 -03:00 committed by Drew DeVault
parent c6b776adbf
commit 6838c23478
45 changed files with 132 additions and 132 deletions

View File

@ -19,15 +19,15 @@ func init() {
register(ChangeFolder{})
}
func (_ ChangeFolder) Aliases() []string {
func (ChangeFolder) Aliases() []string {
return []string{"cf"}
}
func (_ ChangeFolder) Complete(aerc *widgets.Aerc, args []string) []string {
func (ChangeFolder) Complete(aerc *widgets.Aerc, args []string) []string {
return commands.GetFolders(aerc, args)
}
func (_ ChangeFolder) Execute(aerc *widgets.Aerc, args []string) error {
func (ChangeFolder) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) < 2 {
return errors.New("Usage: cf <folder>")
}

View File

@ -11,15 +11,15 @@ func init() {
register(Clear{})
}
func (_ Clear) Aliases() []string {
func (Clear) Aliases() []string {
return []string{"clear"}
}
func (_ Clear) Complete(aerc *widgets.Aerc, args []string) []string {
func (Clear) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Clear) Execute(aerc *widgets.Aerc, args []string) error {
func (Clear) Execute(aerc *widgets.Aerc, args []string) error {
acct := aerc.SelectedAccount()
if acct == nil {
return errors.New("No account selected")

View File

@ -15,15 +15,15 @@ func init() {
register(Compose{})
}
func (_ Compose) Aliases() []string {
func (Compose) Aliases() []string {
return []string{"compose"}
}
func (_ Compose) Complete(aerc *widgets.Aerc, args []string) []string {
func (Compose) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Compose) Execute(aerc *widgets.Aerc, args []string) error {
func (Compose) Execute(aerc *widgets.Aerc, args []string) error {
body, err := buildBody(args)
if err != nil {
return err

View File

@ -16,15 +16,15 @@ func init() {
register(MakeDir{})
}
func (_ MakeDir) Aliases() []string {
func (MakeDir) Aliases() []string {
return []string{"mkdir"}
}
func (_ MakeDir) Complete(aerc *widgets.Aerc, args []string) []string {
func (MakeDir) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ MakeDir) Execute(aerc *widgets.Aerc, args []string) error {
func (MakeDir) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return errors.New("Usage: :mkdir <name>")
}

View File

@ -14,15 +14,15 @@ func init() {
register(NextPrevFolder{})
}
func (_ NextPrevFolder) Aliases() []string {
func (NextPrevFolder) Aliases() []string {
return []string{"next-folder", "prev-folder"}
}
func (_ NextPrevFolder) Complete(aerc *widgets.Aerc, args []string) []string {
func (NextPrevFolder) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NextPrevFolder) Execute(aerc *widgets.Aerc, args []string) error {
func (NextPrevFolder) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) > 2 {
return nextPrevFolderUsage(args[0])
}

View File

@ -13,15 +13,15 @@ func init() {
register(NextPrevResult{})
}
func (_ NextPrevResult) Aliases() []string {
func (NextPrevResult) Aliases() []string {
return []string{"next-result", "prev-result"}
}
func (_ NextPrevResult) Complete(aerc *widgets.Aerc, args []string) []string {
func (NextPrevResult) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NextPrevResult) Execute(aerc *widgets.Aerc, args []string) error {
func (NextPrevResult) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) > 1 {
return nextPrevResultUsage(args[0])
}

View File

@ -15,16 +15,16 @@ func init() {
register(NextPrevMsg{})
}
func (_ NextPrevMsg) Aliases() []string {
func (NextPrevMsg) Aliases() []string {
return []string{"next", "next-message", "prev", "prev-message"}
}
func (_ NextPrevMsg) Complete(aerc *widgets.Aerc, args []string) []string {
func (NextPrevMsg) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error {
var err, n, pct = ParseNextPrevMessage(args)
func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error {
if err != nil {
return err
}

View File

@ -12,15 +12,15 @@ func init() {
register(SearchFilter{})
}
func (_ SearchFilter) Aliases() []string {
func (SearchFilter) Aliases() []string {
return []string{"search", "filter"}
}
func (_ SearchFilter) Complete(aerc *widgets.Aerc, args []string) []string {
func (SearchFilter) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ SearchFilter) Execute(aerc *widgets.Aerc, args []string) error {
func (SearchFilter) Execute(aerc *widgets.Aerc, args []string) error {
acct := aerc.SelectedAccount()
if acct == nil {
return errors.New("No account selected")

View File

@ -13,15 +13,15 @@ func init() {
register(SelectMessage{})
}
func (_ SelectMessage) Aliases() []string {
func (SelectMessage) Aliases() []string {
return []string{"select", "select-message"}
}
func (_ SelectMessage) Complete(aerc *widgets.Aerc, args []string) []string {
func (SelectMessage) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ SelectMessage) Execute(aerc *widgets.Aerc, args []string) error {
func (SelectMessage) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return errors.New("Usage: :select-message <n>")
}

View File

@ -12,15 +12,15 @@ func init() {
register(ViewMessage{})
}
func (_ ViewMessage) Aliases() []string {
func (ViewMessage) Aliases() []string {
return []string{"view-message", "view"}
}
func (_ ViewMessage) Complete(aerc *widgets.Aerc, args []string) []string {
func (ViewMessage) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ ViewMessage) Execute(aerc *widgets.Aerc, args []string) error {
func (ViewMessage) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: view-message")
}

View File

@ -19,11 +19,11 @@ func init() {
register(ChangeDirectory{})
}
func (_ ChangeDirectory) Aliases() []string {
func (ChangeDirectory) Aliases() []string {
return []string{"cd"}
}
func (_ ChangeDirectory) Complete(aerc *widgets.Aerc, args []string) []string {
func (ChangeDirectory) Complete(aerc *widgets.Aerc, args []string) []string {
path := ""
if len(args) >= 1 {
path = args[0]
@ -42,7 +42,7 @@ func (_ ChangeDirectory) Complete(aerc *widgets.Aerc, args []string) []string {
return dirs
}
func (_ ChangeDirectory) Execute(aerc *widgets.Aerc, args []string) error {
func (ChangeDirectory) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) < 1 || len(args) > 2 {
return errors.New("Usage: cd [directory]")
}

View File

@ -12,15 +12,15 @@ func init() {
register(Abort{})
}
func (_ Abort) Aliases() []string {
func (Abort) Aliases() []string {
return []string{"abort"}
}
func (_ Abort) Complete(aerc *widgets.Aerc, args []string) []string {
func (Abort) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Abort) Execute(aerc *widgets.Aerc, args []string) error {
func (Abort) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: abort")
}

View File

@ -17,11 +17,11 @@ func init() {
register(Attach{})
}
func (_ Attach) Aliases() []string {
func (Attach) Aliases() []string {
return []string{"attach"}
}
func (_ Attach) Complete(aerc *widgets.Aerc, args []string) []string {
func (Attach) Complete(aerc *widgets.Aerc, args []string) []string {
path := ""
if len(args) >= 1 {
path = args[0]
@ -30,7 +30,7 @@ func (_ Attach) Complete(aerc *widgets.Aerc, args []string) []string {
return commands.CompletePath(path)
}
func (_ Attach) Execute(aerc *widgets.Aerc, args []string) error {
func (Attach) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return fmt.Errorf("Usage: :attach <path>")
}

View File

@ -12,15 +12,15 @@ func init() {
register(CC{})
}
func (_ CC) Aliases() []string {
func (CC) Aliases() []string {
return []string{"cc", "bcc"}
}
func (_ CC) Complete(aerc *widgets.Aerc, args []string) []string {
func (CC) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ CC) Execute(aerc *widgets.Aerc, args []string) error {
func (CC) Execute(aerc *widgets.Aerc, args []string) error {
var addrs string
if len(args) > 1 {
addrs = strings.Join(args[1:], " ")

View File

@ -14,17 +14,17 @@ func init() {
register(Detach{})
}
func (_ Detach) Aliases() []string {
func (Detach) Aliases() []string {
return []string{"detach"}
}
func (_ Detach) Complete(aerc *widgets.Aerc, args []string) []string {
func (Detach) Complete(aerc *widgets.Aerc, args []string) []string {
composer, _ := aerc.SelectedTab().(*widgets.Composer)
return composer.GetAttachments()
}
func (_ Detach) Execute(aerc *widgets.Aerc, args []string) error {
func (Detach) Execute(aerc *widgets.Aerc, args []string) error {
var path string
composer, _ := aerc.SelectedTab().(*widgets.Composer)

View File

@ -12,15 +12,15 @@ func init() {
register(Edit{})
}
func (_ Edit) Aliases() []string {
func (Edit) Aliases() []string {
return []string{"edit"}
}
func (_ Edit) Complete(aerc *widgets.Aerc, args []string) []string {
func (Edit) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Edit) Execute(aerc *widgets.Aerc, args []string) error {
func (Edit) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: edit")
}

View File

@ -13,15 +13,15 @@ func init() {
register(NextPrevField{})
}
func (_ NextPrevField) Aliases() []string {
func (NextPrevField) Aliases() []string {
return []string{"next-field", "prev-field"}
}
func (_ NextPrevField) Complete(aerc *widgets.Aerc, args []string) []string {
func (NextPrevField) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NextPrevField) Execute(aerc *widgets.Aerc, args []string) error {
func (NextPrevField) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) > 2 {
return nextPrevFieldUsage(args[0])
}

View File

@ -28,15 +28,15 @@ func init() {
register(Send{})
}
func (_ Send) Aliases() []string {
func (Send) Aliases() []string {
return []string{"send"}
}
func (_ Send) Complete(aerc *widgets.Aerc, args []string) []string {
func (Send) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Send) Execute(aerc *widgets.Aerc, args []string) error {
func (Send) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) > 1 {
return errors.New("Usage: send")
}

View File

@ -15,11 +15,11 @@ func init() {
register(ChangeTab{})
}
func (_ ChangeTab) Aliases() []string {
func (ChangeTab) Aliases() []string {
return []string{"ct", "change-tab"}
}
func (_ ChangeTab) Complete(aerc *widgets.Aerc, args []string) []string {
func (ChangeTab) Complete(aerc *widgets.Aerc, args []string) []string {
if len(args) == 0 {
return aerc.TabNames()
}
@ -32,7 +32,7 @@ func (_ ChangeTab) Complete(aerc *widgets.Aerc, args []string) []string {
return out
}
func (_ ChangeTab) Execute(aerc *widgets.Aerc, args []string) error {
func (ChangeTab) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return errors.New(fmt.Sprintf("Usage: %s <tab>", args[0]))
}

View File

@ -17,15 +17,15 @@ func init() {
register(ExecCmd{})
}
func (_ ExecCmd) Aliases() []string {
func (ExecCmd) Aliases() []string {
return []string{"exec"}
}
func (_ ExecCmd) Complete(aerc *widgets.Aerc, args []string) []string {
func (ExecCmd) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ ExecCmd) Execute(aerc *widgets.Aerc, args []string) error {
func (ExecCmd) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) < 2 {
return errors.New("Usage: exec [cmd...]")
}

View File

@ -12,15 +12,15 @@ func init() {
register(Help{})
}
func (_ Help) Aliases() []string {
func (Help) Aliases() []string {
return []string{"help"}
}
func (_ Help) Complete(aerc *widgets.Aerc, args []string) []string {
func (Help) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Help) Execute(aerc *widgets.Aerc, args []string) error {
func (Help) Execute(aerc *widgets.Aerc, args []string) error {
page := "aerc"
if len(args) == 2 {
page = "aerc-" + args[1]

View File

@ -24,15 +24,15 @@ func init() {
register(Archive{})
}
func (_ Archive) Aliases() []string {
func (Archive) Aliases() []string {
return []string{"archive"}
}
func (_ Archive) Complete(aerc *widgets.Aerc, args []string) []string {
func (Archive) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Archive) Execute(aerc *widgets.Aerc, args []string) error {
func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return errors.New("Usage: archive <flat|year|month>")
}

View File

@ -17,15 +17,15 @@ func init() {
register(Copy{})
}
func (_ Copy) Aliases() []string {
func (Copy) Aliases() []string {
return []string{"cp", "copy"}
}
func (_ Copy) Complete(aerc *widgets.Aerc, args []string) []string {
func (Copy) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Copy) Execute(aerc *widgets.Aerc, args []string) error {
func (Copy) Execute(aerc *widgets.Aerc, args []string) error {
opts, optind, err := getopt.Getopts(args, "p")
if err != nil {
return err

View File

@ -16,15 +16,15 @@ func init() {
register(Delete{})
}
func (_ Delete) Aliases() []string {
func (Delete) Aliases() []string {
return []string{"delete", "delete-message"}
}
func (_ Delete) Complete(aerc *widgets.Aerc, args []string) []string {
func (Delete) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Delete) Execute(aerc *widgets.Aerc, args []string) error {
func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: :delete")
}

View File

@ -23,15 +23,15 @@ func init() {
register(forward{})
}
func (_ forward) Aliases() []string {
func (forward) Aliases() []string {
return []string{"forward"}
}
func (_ forward) Complete(aerc *widgets.Aerc, args []string) []string {
func (forward) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ forward) Execute(aerc *widgets.Aerc, args []string) error {
func (forward) Execute(aerc *widgets.Aerc, args []string) error {
opts, optind, err := getopt.Getopts(args, "A")
if err != nil {
return err

View File

@ -18,15 +18,15 @@ func init() {
register(Move{})
}
func (_ Move) Aliases() []string {
func (Move) Aliases() []string {
return []string{"mv", "move"}
}
func (_ Move) Complete(aerc *widgets.Aerc, args []string) []string {
func (Move) Complete(aerc *widgets.Aerc, args []string) []string {
return commands.GetFolders(aerc, args)
}
func (_ Move) Execute(aerc *widgets.Aerc, args []string) error {
func (Move) Execute(aerc *widgets.Aerc, args []string) error {
opts, optind, err := getopt.Getopts(args, "p")
if err != nil {
return err

View File

@ -23,15 +23,15 @@ func init() {
register(Pipe{})
}
func (_ Pipe) Aliases() []string {
func (Pipe) Aliases() []string {
return []string{"pipe"}
}
func (_ Pipe) Complete(aerc *widgets.Aerc, args []string) []string {
func (Pipe) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Pipe) Execute(aerc *widgets.Aerc, args []string) error {
func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
var (
background bool
pipeFull bool

View File

@ -19,15 +19,15 @@ func init() {
register(Read{})
}
func (_ Read) Aliases() []string {
func (Read) Aliases() []string {
return []string{"read", "unread"}
}
func (_ Read) Complete(aerc *widgets.Aerc, args []string) []string {
func (Read) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Read) Execute(aerc *widgets.Aerc, args []string) error {
func (Read) Execute(aerc *widgets.Aerc, args []string) error {
opts, optind, err := getopt.Getopts(args, "t")
if err != nil {
return err

View File

@ -23,15 +23,15 @@ func init() {
register(reply{})
}
func (_ reply) Aliases() []string {
func (reply) Aliases() []string {
return []string{"reply"}
}
func (_ reply) Complete(aerc *widgets.Aerc, args []string) []string {
func (reply) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ reply) Execute(aerc *widgets.Aerc, args []string) error {
func (reply) Execute(aerc *widgets.Aerc, args []string) error {
opts, optind, err := getopt.Getopts(args, "aq")
if err != nil {
return err

View File

@ -12,15 +12,15 @@ func init() {
register(Close{})
}
func (_ Close) Aliases() []string {
func (Close) Aliases() []string {
return []string{"close"}
}
func (_ Close) Complete(aerc *widgets.Aerc, args []string) []string {
func (Close) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Close) Execute(aerc *widgets.Aerc, args []string) error {
func (Close) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: close")
}

View File

@ -14,15 +14,15 @@ func init() {
register(NextPrevPart{})
}
func (_ NextPrevPart) Aliases() []string {
func (NextPrevPart) Aliases() []string {
return []string{"next-part", "prev-part"}
}
func (_ NextPrevPart) Complete(aerc *widgets.Aerc, args []string) []string {
func (NextPrevPart) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NextPrevPart) Execute(aerc *widgets.Aerc, args []string) error {
func (NextPrevPart) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) > 2 {
return nextPrevPartUsage(args[0])
}

View File

@ -11,16 +11,16 @@ func init() {
register(NextPrevMsg{})
}
func (_ NextPrevMsg) Aliases() []string {
func (NextPrevMsg) Aliases() []string {
return []string{"next", "next-message", "prev", "prev-message"}
}
func (_ NextPrevMsg) Complete(aerc *widgets.Aerc, args []string) []string {
func (NextPrevMsg) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error {
err, n, pct := account.ParseNextPrevMessage(args)
func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error {
if err != nil {
return err
}

View File

@ -20,15 +20,15 @@ func init() {
register(Open{})
}
func (_ Open) Aliases() []string {
func (Open) Aliases() []string {
return []string{"open"}
}
func (_ Open) Complete(aerc *widgets.Aerc, args []string) []string {
func (Open) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Open) Execute(aerc *widgets.Aerc, args []string) error {
func (Open) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: open")
}

View File

@ -22,15 +22,15 @@ func init() {
register(Save{})
}
func (_ Save) Aliases() []string {
func (Save) Aliases() []string {
return []string{"save"}
}
func (_ Save) Complete(aerc *widgets.Aerc, args []string) []string {
func (Save) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Save) Execute(aerc *widgets.Aerc, args []string) error {
func (Save) Execute(aerc *widgets.Aerc, args []string) error {
opts, optind, err := getopt.Getopts(args, "p")
if err != nil {
return err

View File

@ -13,15 +13,15 @@ func init() {
register(ToggleHeaders{})
}
func (_ ToggleHeaders) Aliases() []string {
func (ToggleHeaders) Aliases() []string {
return []string{"toggle-headers"}
}
func (_ ToggleHeaders) Complete(aerc *widgets.Aerc, args []string) []string {
func (ToggleHeaders) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ ToggleHeaders) Execute(aerc *widgets.Aerc, args []string) error {
func (ToggleHeaders) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) > 1 {
return toggleHeadersUsage(args[0])
}

View File

@ -13,15 +13,15 @@ func init() {
register(NewAccount{})
}
func (_ NewAccount) Aliases() []string {
func (NewAccount) Aliases() []string {
return []string{"new-account"}
}
func (_ NewAccount) Complete(aerc *widgets.Aerc, args []string) []string {
func (NewAccount) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NewAccount) Execute(aerc *widgets.Aerc, args []string) error {
func (NewAccount) Execute(aerc *widgets.Aerc, args []string) error {
opts, _, err := getopt.Getopts(args, "t")
if err != nil {
return errors.New("Usage: new-account [-t]")

View File

@ -14,15 +14,15 @@ func init() {
register(NextPrevTab{})
}
func (_ NextPrevTab) Aliases() []string {
func (NextPrevTab) Aliases() []string {
return []string{"next-tab", "prev-tab"}
}
func (_ NextPrevTab) Complete(aerc *widgets.Aerc, args []string) []string {
func (NextPrevTab) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ NextPrevTab) Execute(aerc *widgets.Aerc, args []string) error {
func (NextPrevTab) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) > 2 {
return nextPrevTabUsage(args[0])
}

View File

@ -13,15 +13,15 @@ func init() {
register(Prompt{})
}
func (_ Prompt) Aliases() []string {
func (Prompt) Aliases() []string {
return []string{"prompt"}
}
func (_ Prompt) Complete(aerc *widgets.Aerc, args []string) []string {
func (Prompt) Complete(aerc *widgets.Aerc, args []string) []string {
return nil // TODO: add completions
}
func (_ Prompt) Execute(aerc *widgets.Aerc, args []string) error {
func (Prompt) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) < 3 {
return errors.New(fmt.Sprintf("Usage: %s <prompt> <cmd>", args[0]))
}

View File

@ -14,15 +14,15 @@ func init() {
register(PrintWorkDir{})
}
func (_ PrintWorkDir) Aliases() []string {
func (PrintWorkDir) Aliases() []string {
return []string{"pwd"}
}
func (_ PrintWorkDir) Complete(aerc *widgets.Aerc, args []string) []string {
func (PrintWorkDir) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ PrintWorkDir) Execute(aerc *widgets.Aerc, args []string) error {
func (PrintWorkDir) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: pwd")
}

View File

@ -12,11 +12,11 @@ func init() {
register(Quit{})
}
func (_ Quit) Aliases() []string {
func (Quit) Aliases() []string {
return []string{"quit", "exit"}
}
func (_ Quit) Complete(aerc *widgets.Aerc, args []string) []string {
func (Quit) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
@ -26,7 +26,7 @@ func (err ErrorExit) Error() string {
return "exit"
}
func (_ Quit) Execute(aerc *widgets.Aerc, args []string) error {
func (Quit) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: quit")
}

View File

@ -19,12 +19,12 @@ func init() {
register(Set{})
}
func (_ Set) Aliases() []string {
func (Set) Aliases() []string {
return []string{"set"}
}
func (_ Set) Complete(aerc *widgets.Aerc, args []string) []string {
func (Set) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
@ -64,6 +64,6 @@ func SetCore(aerc *widgets.Aerc, args []string) error {
return nil
}
func (_ Set) Execute(aerc *widgets.Aerc, args []string) error {
func (Set) Execute(aerc *widgets.Aerc, args []string) error {
return SetCore(aerc, args)
}

View File

@ -16,11 +16,11 @@ func init() {
register(Term{})
}
func (_ Term) Aliases() []string {
func (Term) Aliases() []string {
return []string{"terminal", "term"}
}
func (_ Term) Complete(aerc *widgets.Aerc, args []string) []string {
func (Term) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
@ -55,6 +55,6 @@ func TermCore(aerc *widgets.Aerc, args []string) error {
return nil
}
func (_ Term) Execute(aerc *widgets.Aerc, args []string) error {
func (Term) Execute(aerc *widgets.Aerc, args []string) error {
return TermCore(aerc, args)
}

View File

@ -12,15 +12,15 @@ func init() {
register(Close{})
}
func (_ Close) Aliases() []string {
func (Close) Aliases() []string {
return []string{"close"}
}
func (_ Close) Complete(aerc *widgets.Aerc, args []string) []string {
func (Close) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Close) Execute(aerc *widgets.Aerc, args []string) error {
func (Close) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 1 {
return errors.New("Usage: close")
}

View File

@ -301,7 +301,7 @@ func (aerc *Aerc) SelectTab(name string) bool {
}
func (aerc *Aerc) SelectTabIndex(index int) bool {
for i, _ := range aerc.tabs.Tabs {
for i := range aerc.tabs.Tabs {
if i == index {
aerc.tabs.Select(i)
return true

View File

@ -92,7 +92,7 @@ type nullHistory struct {
input *ui.TextInput
}
func (_ *nullHistory) Add(string) {}
func (*nullHistory) Add(string) {}
func (h *nullHistory) Next() string {
return h.input.String()
@ -102,4 +102,4 @@ func (h *nullHistory) Prev() string {
return h.input.String()
}
func (_ *nullHistory) Reset() {}
func (*nullHistory) Reset() {}