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