removed header & changed delimiter to pipe

Signed-off-by: Andreas Ulm <andreas.ulm@root360.de>
This commit is contained in:
Andreas Ulm 2019-04-25 15:59:41 +02:00
parent 2599cff8a6
commit b96a190c74

View File

@ -22,10 +22,6 @@ var CmdRepos = cli.Command{
Name: "login, l", Name: "login, l",
Usage: "Indicate one login, optional when inside a gitea repository", Usage: "Indicate one login, optional when inside a gitea repository",
}, },
cli.BoolFlag{
Name: "noheader",
Usage: "Skip header on output.",
},
}, },
} }
@ -43,9 +39,7 @@ func runRepos(ctx *cli.Context) error {
return nil return nil
} }
if noheader := getGlobalFlag(ctx, "noheader"); noheader != "true" { fmt.Println("Name | Type/Mode | SSH-URL | Owner")
fmt.Printf("Name\tType/Mode\tSSH-URL\tOwner\n")
}
for _, rp := range rps { for _, rp := range rps {
var mode = "source" var mode = "source"
if rp.Fork { if rp.Fork {
@ -54,7 +48,7 @@ func runRepos(ctx *cli.Context) error {
if rp.Mirror { if rp.Mirror {
mode = "mirror" mode = "mirror"
} }
fmt.Printf("%s\t%s\t%s\t%s\n", rp.FullName, mode, rp.SSHURL, rp.Owner.UserName) fmt.Printf("%s | %s | %s | %s\n", rp.FullName, mode, rp.SSHURL, rp.Owner.UserName)
} }
return nil return nil