Просмотр исходного кода

修正配置文件输出路径

将`tigerv1`、`lionv1`和`catv1`命令中输出配置文件的默认路径从输入配置文件路径更正为输出配置文件路径,解决了配置文件反向输出的问题。
SongZihuan 1 неделя назад
Родитель
Сommit
b2521c168e
4 измененных файлов с 7 добавлено и 3 удалено
  1. 4 0
      CHANGELOG.md
  2. 1 1
      src/cmd/catv1/main.go
  3. 1 1
      src/cmd/lionv1/main.go
  4. 1 1
      src/cmd/tigerv1/main.go

+ 4 - 0
CHANGELOG.md

@@ -13,6 +13,10 @@
 
 - 修改`utils`包下的命名。
 
+### 修复
+
+- 修复了配置文件反向输出的问题。
+
 ### 重构
 
 - 使用`viper`重构配置文件读取。

+ 1 - 1
src/cmd/catv1/main.go

@@ -33,7 +33,7 @@ func main() {
 		catv1.MainV1)
 
 	cmd.Flags().StringVarP(&catv1.InputConfigFilePath, "config", "c", catv1.InputConfigFilePath, "the file path of the configuration file")
-	cmd.Flags().StringVarP(&catv1.OutputConfigFilePath, "output-config", "o", catv1.InputConfigFilePath, "the file path of the output configuration file")
+	cmd.Flags().StringVarP(&catv1.OutputConfigFilePath, "output-config", "o", catv1.OutputConfigFilePath, "the file path of the output configuration file")
 
 	install := &cobra.Command{
 		Use:           args1Install,

+ 1 - 1
src/cmd/lionv1/main.go

@@ -22,7 +22,7 @@ func main() {
 		lionv1.MainV1)
 
 	cmd.Flags().StringVarP(&lionv1.InputConfigFilePath, "config", "c", lionv1.InputConfigFilePath, "the file path of the configuration file")
-	cmd.Flags().StringVarP(&lionv1.OutputConfigFilePath, "output-config", "o", lionv1.InputConfigFilePath, "the file path of the output configuration file")
+	cmd.Flags().StringVarP(&lionv1.OutputConfigFilePath, "output-config", "o", lionv1.OutputConfigFilePath, "the file path of the output configuration file")
 
 	exitutils.ExitQuite(cmd.Execute())
 }

+ 1 - 1
src/cmd/tigerv1/main.go

@@ -22,7 +22,7 @@ func main() {
 		tigerv1.MainV1)
 
 	cmd.Flags().StringVarP(&tigerv1.InputConfigFilePath, "config", "c", tigerv1.InputConfigFilePath, "the file path of the configuration file")
-	cmd.Flags().StringVarP(&tigerv1.OutputConfigFilePath, "output-config", "o", tigerv1.InputConfigFilePath, "the file path of the output configuration file")
+	cmd.Flags().StringVarP(&tigerv1.OutputConfigFilePath, "output-config", "o", tigerv1.OutputConfigFilePath, "the file path of the output configuration file")
 
 	exitutils.ExitQuite(cmd.Execute())
 }