1
0
mirror of https://github.com/directorz/mailfull-go.git synced 2025-12-17 09:37:02 +00:00

Change subcommand name: domainlist -> domains

This commit is contained in:
teru
2016-08-11 13:26:20 +09:00
parent 42d4e6389a
commit d7aac2d803
2 changed files with 7 additions and 7 deletions

View File

@@ -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)

View File

@@ -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()