From 42d4e6389ae532caa8b7f2893fd388c90ef33fd0 Mon Sep 17 00:00:00 2001 From: teru Date: Thu, 11 Aug 2016 13:24:01 +0900 Subject: [PATCH] Change synopsis and help message --- cmd/mailfull/command/commit.go | 7 ++++--- cmd/mailfull/command/domainlist.go | 8 ++++---- cmd/mailfull/command/init.go | 5 +++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cmd/mailfull/command/commit.go b/cmd/mailfull/command/commit.go index 2bd15d7..790b071 100644 --- a/cmd/mailfull/command/commit.go +++ b/cmd/mailfull/command/commit.go @@ -13,7 +13,7 @@ type CommitCommand struct { // Synopsis returns a one-line synopsis. func (c *CommitCommand) Synopsis() string { - return "Create a database from the structure of the MailData directory." + return "Create databases from the structure of the MailData directory." } // Help returns long-form help text. @@ -23,9 +23,10 @@ Usage: %s %s Description: - Create a database from the structure of the MailData directory. + %s `, - c.CmdName, c.SubCmdName) + c.CmdName, c.SubCmdName, + c.Synopsis()) return txt[1:] } diff --git a/cmd/mailfull/command/domainlist.go b/cmd/mailfull/command/domainlist.go index 11657d2..e8208bb 100644 --- a/cmd/mailfull/command/domainlist.go +++ b/cmd/mailfull/command/domainlist.go @@ -14,7 +14,7 @@ type DomainListCommand struct { // Synopsis returns a one-line synopsis. func (c *DomainListCommand) Synopsis() string { - return "Show all domains." + return "Show domains." } // Help returns long-form help text. @@ -24,9 +24,10 @@ Usage: %s %s Description: - Show all domains. + %s `, - c.CmdName, c.SubCmdName) + c.CmdName, c.SubCmdName, + c.Synopsis()) return txt[1:] } @@ -44,7 +45,6 @@ func (c *DomainListCommand) Run(args []string) int { fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err) return 1 } - sort.Sort(mailfull.DomainSlice(domains)) for _, domain := range domains { diff --git a/cmd/mailfull/command/init.go b/cmd/mailfull/command/init.go index 11a818e..b915c7c 100644 --- a/cmd/mailfull/command/init.go +++ b/cmd/mailfull/command/init.go @@ -23,9 +23,10 @@ Usage: %s %s Description: - Initializes current directory as a Mailfull repository. + %s `, - c.CmdName, c.SubCmdName) + c.CmdName, c.SubCmdName, + c.Synopsis()) return txt[1:] }