mirror of
https://github.com/directorz/mailfull-go.git
synced 2025-12-18 10:07:03 +00:00
Change output format of domains subcommands #8
This commit is contained in:
@@ -25,6 +25,7 @@ Usage:
|
|||||||
|
|
||||||
Description:
|
Description:
|
||||||
%s
|
%s
|
||||||
|
Disabled domains are marked "!" the beginning.
|
||||||
`,
|
`,
|
||||||
c.CmdName, c.SubCmdName,
|
c.CmdName, c.SubCmdName,
|
||||||
c.Synopsis())
|
c.Synopsis())
|
||||||
@@ -48,7 +49,12 @@ func (c *DomainsCommand) Run(args []string) int {
|
|||||||
sort.Sort(mailfull.DomainSlice(domains))
|
sort.Sort(mailfull.DomainSlice(domains))
|
||||||
|
|
||||||
for _, domain := range 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
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user