1
0
mirror of https://github.com/directorz/mailfull-go.git synced 2025-12-17 17:47:04 +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" "github.com/directorz/mailfull-go"
) )
// DomainListCommand represents a DomainListCommand. // DomainsCommand represents a DomainsCommand.
type DomainListCommand struct { type DomainsCommand struct {
Meta Meta
} }
// Synopsis returns a one-line synopsis. // Synopsis returns a one-line synopsis.
func (c *DomainListCommand) Synopsis() string { func (c *DomainsCommand) Synopsis() string {
return "Show domains." return "Show domains."
} }
// Help returns long-form help text. // Help returns long-form help text.
func (c *DomainListCommand) Help() string { func (c *DomainsCommand) Help() string {
txt := fmt.Sprintf(` txt := fmt.Sprintf(`
Usage: Usage:
%s %s %s %s
@@ -33,7 +33,7 @@ Description:
} }
// Run runs the command and returns the exit status. // 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(".") repo, err := mailfull.OpenRepository(".")
if err != nil { if err != nil {
fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err) fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err)

View File

@@ -43,9 +43,9 @@ func main() {
meta.SubCmdName = c.Subcommand() meta.SubCmdName = c.Subcommand()
return &command.InitCommand{Meta: meta}, nil return &command.InitCommand{Meta: meta}, nil
}, },
"domainlist": func() (cli.Command, error) { "domains": func() (cli.Command, error) {
meta.SubCmdName = c.Subcommand() meta.SubCmdName = c.Subcommand()
return &command.DomainListCommand{Meta: meta}, nil return &command.DomainsCommand{Meta: meta}, nil
}, },
"commit": func() (cli.Command, error) { "commit": func() (cli.Command, error) {
meta.SubCmdName = c.Subcommand() meta.SubCmdName = c.Subcommand()