未验证 提交 e320054a 编写于 作者: A Avi Aryan

fix bug with shared app creds, #73

上级 8df5b02d
......@@ -105,9 +105,9 @@ func ShowAppPerms(app string) error {
}
spinner.Stop()
// output
for index := range ".." {
fmt.Printf("%s%s:%s\n", common.ColonPad(permissions[index].Description, 20),
permissions[index].Username, permissions[index].Password)
for _, p := range permissions {
fmt.Printf("%s%s:%s\n", common.ColonPad(p.Description, 20),
p.Username, p.Password)
}
return nil
}
......
......@@ -52,6 +52,11 @@ func StringInSlice(a string, list []string) bool {
// ColonPad pads spaces after colon
func ColonPad(text string, length int) string {
// remove brackets in names, they are long
bracket := strings.Index(text, "(")
if bracket > -1 {
text = text[:bracket]
}
textLen := len(text)
text += ":"
for i := 0; i < (length - textLen - 1); i++ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册