diff --git a/cmd/mailfull/command/domainlist.go b/cmd/mailfull/command/domains.go similarity index 76% rename from cmd/mailfull/command/domainlist.go rename to cmd/mailfull/command/domains.go index e8208bb..3d7f197 100644 --- a/cmd/mailfull/command/domainlist.go +++ b/cmd/mailfull/command/domains.go @@ -7,18 +7,18 @@ import ( "github.com/directorz/mailfull-go" ) -// DomainListCommand represents a DomainListCommand. -type DomainListCommand struct { +// DomainsCommand represents a DomainsCommand. +type DomainsCommand struct { Meta } // Synopsis returns a one-line synopsis. -func (c *DomainListCommand) Synopsis() string { +func (c *DomainsCommand) Synopsis() string { return "Show domains." } // Help returns long-form help text. -func (c *DomainListCommand) Help() string { +func (c *DomainsCommand) Help() string { txt := fmt.Sprintf(` Usage: %s %s @@ -33,7 +33,7 @@ Description: } // Run runs the command and returns the exit status. -func (c *DomainListCommand) Run(args []string) int { +func (c *DomainsCommand) Run(args []string) int { repo, err := mailfull.OpenRepository(".") if err != nil { fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err) diff --git a/cmd/mailfull/main.go b/cmd/mailfull/main.go index 9c48eee..711a197 100644 --- a/cmd/mailfull/main.go +++ b/cmd/mailfull/main.go @@ -43,9 +43,9 @@ func main() { meta.SubCmdName = c.Subcommand() return &command.InitCommand{Meta: meta}, nil }, - "domainlist": func() (cli.Command, error) { + "domains": func() (cli.Command, error) { meta.SubCmdName = c.Subcommand() - return &command.DomainListCommand{Meta: meta}, nil + return &command.DomainsCommand{Meta: meta}, nil }, "commit": func() (cli.Command, error) { meta.SubCmdName = c.Subcommand()