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:
@@ -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)
|
||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user