func before(c *cli.Context) error { var level int if c.GlobalBool("debug") || c.Bool("debug") { level = 2 } log.SetLoggers(level, os.Stdout, os.Stderr) return nil }
func before(cmd *cobra.Command, args []string) { config.Set("chain_id", chainidFlag) log.SetLoggers(logLevelFlag, os.Stdout, os.Stderr) if !strings.HasPrefix(nodeAddrFlag, "http://") { nodeAddrFlag = "http://" + nodeAddrFlag } if !strings.HasSuffix(nodeAddrFlag, "/") { nodeAddrFlag += "/" } if !strings.HasPrefix(signAddrFlag, "http://") { signAddrFlag = "http://" + signAddrFlag } }