Skip to content

Commit a16e938

Browse files
author
mritd
committed
feat(rename): rename package
rename package Signed-off-by: mritd <[email protected]>
1 parent cf4df8c commit a16e938

File tree

23 files changed

+117
-119
lines changed

23 files changed

+117
-119
lines changed

cmd/chore.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cmd
22

33
import (
44
"github.com/mritd/gitflow-toolkit/consts"
5-
"github.com/mritd/gitflow-toolkit/util"
5+
"github.com/mritd/gitflow-toolkit/git"
66
"github.com/spf13/cobra"
77
)
88

@@ -17,7 +17,7 @@ Create a branch with a prefix of chore.`,
1717
if len(args) != 1 {
1818
_ = cmd.Help()
1919
} else {
20-
util.Checkout(consts.CHORE, args[0])
20+
git.Checkout(consts.CHORE, args[0])
2121
}
2222

2323
},

cmd/ci.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
"github.com/mritd/gitflow-toolkit/commit"
7+
"github.com/mritd/gitflow-toolkit/git"
8+
89
"github.com/mritd/gitflow-toolkit/consts"
9-
"github.com/mritd/gitflow-toolkit/util"
1010
"github.com/spf13/cobra"
1111
)
1212

@@ -29,27 +29,27 @@ func NewCi() *cobra.Command {
2929
Aliases: []string{"git-ci"},
3030
Run: func(cmd *cobra.Command, args []string) {
3131

32-
util.CheckGitProject()
32+
git.CheckGitProject()
3333

34-
if !util.CheckStagedFiles() {
34+
if !git.CheckStagedFiles() {
3535
fmt.Println("No staged any files")
3636
os.Exit(1)
3737
}
3838

39-
cm := &commit.Message{Sob: commit.GenSOB()}
39+
cm := &git.Message{Sob: git.GenSOB()}
4040

4141
if fastCommit {
4242
cm.Type = consts.FEAT
4343
cm.Scope = "Undefined"
44-
cm.Subject = commit.InputSubject()
45-
commit.Commit(cm)
44+
cm.Subject = git.InputSubject()
45+
git.Commit(cm)
4646
} else {
47-
cm.Type = commit.SelectCommitType()
48-
cm.Scope = commit.InputScope()
49-
cm.Subject = commit.InputSubject()
50-
cm.Body = commit.InputBody()
51-
cm.Footer = commit.InputFooter()
52-
commit.Commit(cm)
47+
cm.Type = git.SelectCommitType()
48+
cm.Scope = git.InputScope()
49+
cm.Subject = git.InputSubject()
50+
cm.Body = git.InputBody()
51+
cm.Footer = git.InputFooter()
52+
git.Commit(cm)
5353
}
5454
},
5555
}

cmd/cm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cmd
22

33
import (
4-
"github.com/mritd/gitflow-toolkit/commit"
4+
"github.com/mritd/gitflow-toolkit/git"
55
"github.com/spf13/cobra"
66
)
77

@@ -16,7 +16,7 @@ Check if the file content meets the Angular Community Specification.`,
1616
if len(args) != 1 {
1717
_ = cmd.Help()
1818
} else {
19-
commit.CheckCommitMessage(args)
19+
git.CheckCommitMessage(args[0])
2020
}
2121
},
2222
}

cmd/docs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cmd
22

33
import (
44
"github.com/mritd/gitflow-toolkit/consts"
5-
"github.com/mritd/gitflow-toolkit/util"
5+
"github.com/mritd/gitflow-toolkit/git"
66
"github.com/spf13/cobra"
77
)
88

@@ -17,7 +17,7 @@ Create a branch with a prefix of docs.`,
1717
if len(args) != 1 {
1818
_ = cmd.Help()
1919
} else {
20-
util.Checkout(consts.DOCS, args[0])
20+
git.Checkout(consts.DOCS, args[0])
2121
}
2222
},
2323
}

cmd/feat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cmd
22

33
import (
44
"github.com/mritd/gitflow-toolkit/consts"
5-
"github.com/mritd/gitflow-toolkit/util"
5+
"github.com/mritd/gitflow-toolkit/git"
66
"github.com/spf13/cobra"
77
)
88

@@ -17,7 +17,7 @@ Create a branch with a prefix of feat.`,
1717
if len(args) != 1 {
1818
_ = cmd.Help()
1919
} else {
20-
util.Checkout(consts.FEAT, args[0])
20+
git.Checkout(consts.FEAT, args[0])
2121
}
2222
},
2323
}

cmd/fix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cmd
22

33
import (
44
"github.com/mritd/gitflow-toolkit/consts"
5-
"github.com/mritd/gitflow-toolkit/util"
5+
"github.com/mritd/gitflow-toolkit/git"
66
"github.com/spf13/cobra"
77
)
88

@@ -17,7 +17,7 @@ Create a branch with a prefix of fix.`,
1717
if len(args) != 1 {
1818
_ = cmd.Help()
1919
} else {
20-
util.Checkout(consts.FIX, args[0])
20+
git.Checkout(consts.FIX, args[0])
2121
}
2222
},
2323
}

cmd/hotfix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cmd
22

33
import (
44
"github.com/mritd/gitflow-toolkit/consts"
5-
"github.com/mritd/gitflow-toolkit/util"
5+
"github.com/mritd/gitflow-toolkit/git"
66
"github.com/spf13/cobra"
77
)
88

@@ -17,7 +17,7 @@ Create a branch with a prefix of hotfix.`,
1717
if len(args) != 1 {
1818
_ = cmd.Help()
1919
} else {
20-
util.Checkout(consts.HOTFIX, args[0])
20+
git.Checkout(consts.HOTFIX, args[0])
2121
}
2222
},
2323
}

cmd/install.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cmd
22

33
import (
4-
"github.com/mritd/gitflow-toolkit/util"
4+
"github.com/mritd/gitflow-toolkit/utils"
55
"github.com/spf13/cobra"
66
)
77

@@ -13,7 +13,7 @@ func NewInstall() *cobra.Command {
1313
Install gitflow-toolkit(only support *Unix).`,
1414
Aliases: []string{"install"},
1515
Run: func(cmd *cobra.Command, args []string) {
16-
util.Install()
16+
utils.Install()
1717
},
1818
}
1919
}

cmd/perf.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cmd
22

33
import (
44
"github.com/mritd/gitflow-toolkit/consts"
5-
"github.com/mritd/gitflow-toolkit/util"
5+
"github.com/mritd/gitflow-toolkit/git"
66
"github.com/spf13/cobra"
77
)
88

@@ -17,7 +17,7 @@ Create a branch with a prefix of perf.`,
1717
if len(args) != 1 {
1818
_ = cmd.Help()
1919
} else {
20-
util.Checkout(consts.PERF, args[0])
20+
git.Checkout(consts.PERF, args[0])
2121
}
2222
},
2323
}

cmd/ps.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cmd
22

33
import (
4-
"github.com/mritd/gitflow-toolkit/util"
4+
"github.com/mritd/gitflow-toolkit/git"
55
"github.com/spf13/cobra"
66
)
77

@@ -13,7 +13,7 @@ func NewPs() *cobra.Command {
1313
Push local branch to remote.`,
1414
Aliases: []string{"git-ps"},
1515
Run: func(cmd *cobra.Command, args []string) {
16-
util.Push()
16+
git.Push()
1717
},
1818
}
1919
}

0 commit comments

Comments
 (0)