Skip to content

Commit f94d114

Browse files
author
R0n0066
committed
update (cmd): CFM to CMF
1 parent 2992746 commit f94d114

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

cmd/root.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ var variables []keyValue
4242

4343
// rootCmd represents the base command when called without any subcommands
4444
var rootCmd = &cobra.Command{
45-
Use: "cfm",
45+
Use: "cmf",
4646
Short: "Generate commit message for your repo",
47-
Long: `CFM (Commit Format Message):
47+
Long: `CMF (Commit Message Formatter):
4848
Generate a formated message for your repo using common notations for:
4949
- Features
5050
- Fixes
5151
- Refactoring
52-
- Tests`,
52+
- Updates
53+
- Tests
54+
- Docs`,
5355
PreRun: func(cmd *cobra.Command, args []string) { promptList() },
5456
Run: func(cmd *cobra.Command, args []string) {
5557
p := parseTemplate(viper.GetString("template"))
@@ -67,7 +69,7 @@ func Execute() {
6769

6870
func init() {
6971
cobra.OnInitialize(initConfig)
70-
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cfm.yaml)")
72+
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cmf.yaml)")
7173
}
7274

7375
func loadLocalConfigFile(name string) error {
@@ -84,7 +86,7 @@ func initConfig() {
8486

8587
projectDir, err := os.Getwd()
8688
checkErr(err)
87-
projectConfigFile := projectDir + "/.cfm.yaml"
89+
projectConfigFile := projectDir + "/.cmf.yaml"
8890

8991
if _, err := os.Stat(projectConfigFile); err == nil {
9092
cfgFile = projectConfigFile
@@ -100,7 +102,7 @@ func initConfig() {
100102

101103
// Search config in home directory with name ".cfm" (without extension).
102104
viper.AddConfigPath(home)
103-
viper.SetConfigName(".cfm")
105+
viper.SetConfigName(".cmf")
104106
}
105107

106108
viper.AutomaticEnv()

cmd/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ import (
3030
var jiraCmd = &cobra.Command{
3131
Use: "version",
3232
Short: "Display current version",
33-
Long: `version Display the current version of cfm`,
33+
Long: `version Display the current version of cmf`,
3434
Run: func(cmd *cobra.Command, args []string) {
35-
fmt.Println("CFM Version:")
35+
fmt.Println("CMF Version:")
3636
fmt.Println("v1.0.0")
3737
},
3838
}

0 commit comments

Comments
 (0)