Skip to content

Commit 402da25

Browse files
committed
fixed error in ui formats
1 parent 819316a commit 402da25

File tree

17 files changed

+102
-84
lines changed

17 files changed

+102
-84
lines changed

cmd/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var agentCmd = &cobra.Command{
1717
%s commands are a set of subcommands available for ci/cd services. They are meant as a way of services to easily
1818
be compatible with %s.
1919
These are not meant to used locally as a part of your local workflow
20-
`, ui.Format("agent").Bold, ui.Format("the praqmatic workflow").Bold),
20+
`, ui.Format.Bold("agent"), ui.Format.Bold("the praqmatic workflow")),
2121
}
2222

2323
func init() {

cmd/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var authCmd = &cobra.Command{
1717
Auth will prompt your for a github username and password,
1818
which will generate a token we use for your github account.
1919
Don't worry the token does not create admin access,
20-
only acces to manage issues for public repositories'`, ui.Format("auth").Bold),
20+
only acces to manage issues for public repositories'`, ui.Format.Bold("auth")),
2121
Run: func(cmd *cobra.Command, args []string) {
2222
phlow.Auth()
2323
},

cmd/cleanup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var cleanCmd = &cobra.Command{
1919
Long: fmt.Sprintf(`
2020
%s removes all branches prefixed with 'delivered/'.
2121
It deletes safely by running 'git branch -d'. By default, both local and remote branches are deleted.
22-
`, ui.Format("phlow clean").Bold),
22+
`, ui.Format.Bold("phlow clean")),
2323
PreRun: func(cmd *cobra.Command, args []string) {
2424
cmdperm.RequiredCurDirRepository()
2525
},

cmd/cmdperm/prerunperm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func RequiredAuthentication() {
1515
user := githandler.ConfigGet("user", "phlow")
1616

1717
if token == "" || user == "" {
18-
fmt.Printf("Please run %s to connect to github \n", ui.Format("auth").Bold)
18+
fmt.Printf("Please run %s to connect to github \n", ui.Format.Bold("auth"))
1919
os.Exit(0)
2020
}
2121
}

cmd/deliver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ and pushed to your "remote default branch" and prefixed with "/delivered"
3535
//Run tests before deliver
3636
if len(args) > 0 {
3737
if err := phlow.TestDeliver(args); err != nil {
38-
fmt.Println(ui.Format("!! Tests did not exit with code 0 !!").Error)
38+
fmt.Println(ui.Format.Error("!! Tests did not exit with code 0 !!"))
3939
fmt.Println(err)
4040
os.Exit(1)
4141
}
42-
fmt.Println(ui.Format("Tests exited with code 0 - starting deliver process").Success)
42+
fmt.Println(ui.Format.Success("Tests exited with code 0 - starting deliver process"))
4343
}
4444

4545
//If Run if local deliver

cmd/integrate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var integrateCmd = &cobra.Command{
1717
Long: fmt.Sprintf(`
1818
%s delivers the changes in an agent version. The current branch if will be merged into the default branch
1919
with your default branch and pushed to the remote.
20-
`, ui.Format("integrate").Bold),
20+
`, ui.Format.Bold("integrate")),
2121
PreRun: func(cmd *cobra.Command, args []string) {
2222
cmdperm.RequiredCurDirRepository()
2323
},

cmd/mkalias.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var mkaliasCmd = &cobra.Command{
1515
Long: fmt.Sprintf(`
1616
%s creates all the alias for your git phlow commands, so you can type 'git workon' in stead of
1717
'git phlow workon', the alias will be created in your global .gitconfig file
18-
`, ui.Format("mkalias").Bold),
18+
`, ui.Format.Bold("mkalias")),
1919
Run: func(cmd *cobra.Command, args []string) {
2020
phlow.MkAlias()
2121
},

cmd/upnext.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var upNextCmd = &cobra.Command{
1919
Long: fmt.Sprintf(`
2020
%s gets the next branch ready for integration based on the branch creation time.
2121
The branch created first, is the branch thats up next.
22-
`, ui.Format("upnext").Bold),
22+
`, ui.Format.Bold("upnext")),
2323
PreRun: func(cmd *cobra.Command, args []string) {
2424
cmdperm.RequiredCurDirRepository()
2525
},

cmd/workon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var workonCmd = &cobra.Command{
2020
A branch will be created from your remote default branch and named after the title
2121
of the issue eg. branch => "42-calculate-meaning-of-life".
2222
From here you the work can start, and when finished run phlow wrapup.
23-
`, ui.Format("workon").Bold),
23+
`, ui.Format.Bold("workon")),
2424
PreRun: func(cmd *cobra.Command, args []string) {
2525
cmdperm.RequiredCurDirRepository()
2626
cmdperm.RequiredAuthentication()

cmd/wrapup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var wrapupCmd = &cobra.Command{
1616
Long: fmt.Sprintf(`
1717
%s adds all your work from the working area to the index, and makes an automatic close # commit,
1818
which closes an issue on github eg. commit message => "close #42 fetch meaning of life"
19-
`, ui.Format("wrapup").Bold),
19+
`, ui.Format.Bold("wrapup")),
2020
PreRun: func(cmd *cobra.Command, args []string) {
2121
cmdperm.RequiredCurDirRepository()
2222
},

0 commit comments

Comments
 (0)