fix
This commit is contained in:
parent
4775d71e04
commit
3a8f8f083c
|
@ -19,7 +19,7 @@ type LocalServices struct {
|
|||
|
||||
var checkCmd = &cobra.Command{
|
||||
Use: "check",
|
||||
Short: "check microservice.",
|
||||
Short: "check etc/service/registry auto version update or install.",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(args) != 1 {
|
||||
fmt.Println("Please input the name of the microservice to be updated!")
|
||||
|
|
|
@ -16,13 +16,13 @@ func init() {
|
|||
// get os env.
|
||||
env.NewEnv()
|
||||
|
||||
psCmd.Flags().StringVarP(®istryUrl, "registry", "r", "", "registry url.")
|
||||
rootCmd.Flags().StringVarP(®istryUrl, "registry", "r", "", "registry server url.")
|
||||
|
||||
if registryUrl == "" {
|
||||
registryUrl = env.GetEnvDefault("BlocksMesh_Registry", "http://registry.apinb.com")
|
||||
}
|
||||
|
||||
rootCmd.AddCommand(psCmd, installCmd)
|
||||
rootCmd.AddCommand(psCmd, installCmd, updateCmd, checkCmd)
|
||||
}
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
|
|
Loading…
Reference in New Issue