mirror of
https://github.com/directorz/mailfull-go.git
synced 2025-12-17 17:47:04 +00:00
Change output format of domains subcommands #8
This commit is contained in:
@@ -25,6 +25,7 @@ Usage:
|
||||
|
||||
Description:
|
||||
%s
|
||||
Disabled domains are marked "!" the beginning.
|
||||
`,
|
||||
c.CmdName, c.SubCmdName,
|
||||
c.Synopsis())
|
||||
@@ -48,7 +49,12 @@ func (c *DomainsCommand) Run(args []string) int {
|
||||
sort.Sort(mailfull.DomainSlice(domains))
|
||||
|
||||
for _, domain := range domains {
|
||||
fmt.Fprintf(c.UI.Writer, "%s\n", domain.Name())
|
||||
disableStr := ""
|
||||
if domain.Disabled() {
|
||||
disableStr = "!"
|
||||
}
|
||||
|
||||
fmt.Fprintf(c.UI.Writer, "%s%s\n", disableStr, domain.Name())
|
||||
}
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user