-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CLI-62] add alias ls to the list command and display logic
- Loading branch information
bright-poku
committed
Mar 15, 2021
1 parent
73724b2
commit fd9fa38
Showing
2 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package display | ||
|
||
//import "gopkg.in/auth0.v5" | ||
|
||
type tenantView struct { | ||
Name string | ||
} | ||
|
||
func (v *tenantView) AsTableHeader() []string { | ||
return []string{"Available tenants"} | ||
} | ||
|
||
func (v *tenantView) AsTableRow() []string { | ||
return []string{v.Name} | ||
} | ||
|
||
func (r *Renderer) ShowTenants(data []string) { | ||
var results []View | ||
for _, item := range data { | ||
results = append(results, &tenantView{ | ||
Name: item, | ||
}) | ||
} | ||
|
||
r.Results(results) | ||
} |