Skip to content

Commit 55ceea4

Browse files
niuzhenguomastersingh24
authored andcommittedApr 7, 2018
[FAB-9246] Remove peer version flag
It's confused that we set version flag as global, but it's not valid for peer subcommands. Change-Id: I35a7ad5ab8ce0917f69fe5515ecf8c5e5e93a09f Signed-off-by: Zhenguo Niu <Niu.ZGlinux@gmail.com>
1 parent 0d3ccd0 commit 55ceea4

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed
 

‎peer/main.go

-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0
77
package main
88

99
import (
10-
"fmt"
1110
_ "net/http/pprof"
1211
"os"
1312
"runtime"
@@ -51,18 +50,8 @@ var mainCmd = &cobra.Command{
5150

5251
return nil
5352
},
54-
Run: func(cmd *cobra.Command, args []string) {
55-
if versionFlag {
56-
fmt.Print(version.GetInfo())
57-
} else {
58-
cmd.HelpFunc()(cmd, args)
59-
}
60-
},
6153
}
6254

63-
// Peer command version flag
64-
var versionFlag bool
65-
6655
func main() {
6756
// For environment variables.
6857
viper.SetEnvPrefix(cmdRoot)
@@ -73,7 +62,6 @@ func main() {
7362
// Define command-line flags that are valid for all peer commands and
7463
// subcommands.
7564
mainFlags := mainCmd.PersistentFlags()
76-
mainFlags.BoolVarP(&versionFlag, "version", "v", false, "Display the build version for this fabric peer")
7765

7866
mainFlags.String("logging-level", "", "Default logging level and overrides, see core.yaml for full syntax")
7967
viper.BindPFlag("logging_level", mainFlags.Lookup("logging-level"))

0 commit comments

Comments
 (0)
Please sign in to comment.