Skip to content

added use of Cobra CLI#419

Merged
ebuchman merged 5 commits intodevelopfrom
cli_cobra
Mar 27, 2017
Merged

added use of Cobra CLI#419
ebuchman merged 5 commits intodevelopfrom
cli_cobra

Conversation

@rigelrozanski
Copy link
Contributor

closes #312

replaced internal CLI system with Cobra

)

var replayCmd = &cobra.Command{
Use: "replay",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replay [walfile]

}

var replayConsoleCmd = &cobra.Command{
Use: "replay_console",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replay_console [walfile]

// parse flags

// configuration options
RootCmd.PersistentFlags().StringVar(&moniker, "moniker", config.GetString("moniker"), "Node Name")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I am wrong, but all these flags belong to runNodeCmd and should be moved there. Except maybe log_level. Can we do that?


//flags
var (
printHelp bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused var?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, thanks

@codecov-io
Copy link

codecov-io commented Feb 24, 2017

Codecov Report

Merging #419 into develop will decrease coverage by 0.36%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           develop   #419      +/-   ##
=========================================
- Coverage    52.37%    52%   -0.37%     
=========================================
  Files           44     44              
  Lines         4926   4926              
=========================================
- Hits          2580   2562      -18     
- Misses        2130   2142      +12     
- Partials       216    222       +6

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4f6254...0413a87. Read the comment docs.

@rigelrozanski
Copy link
Contributor Author

Add use of Viper to replace config as a part of this PR?

@ethanfrey
Copy link
Contributor

I think the go-config -> viper should be a separate pull request.

Cobra alone cleans up the cli. Changing the config file, doesn't just involve changing the cli, it means changing every call to config.GetString("foo") scattered around the code. And the test config setup, in tendermint and other packages. And possibly the basecoin cli. I know I set the config directly in some of my test cases...

It's a big piece of work. Maybe get cobra/viper in basecoin first, then go for viper in tendermint core.

@ethanfrey
Copy link
Contributor

P.S. It looks like you need to rebase on develop again...

@rigelrozanski
Copy link
Contributor Author

Thanks Frey, I will make a separate PR off of cli_cobra branch

@rigelrozanski rigelrozanski force-pushed the cli_cobra branch 2 times, most recently from b687d63 to c9acae8 Compare March 2, 2017 02:31
glide.yaml Outdated
@@ -1,4 +1,4 @@
package: github.com/tendermint/tendermint
eackage: github.com/tendermint/tendermint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

@ebuchman ebuchman merged commit 162fbdd into develop Mar 27, 2017
@ebuchman ebuchman deleted the cli_cobra branch March 27, 2017 21:16
@ebuchman ebuchman mentioned this pull request Mar 27, 2017
faddat referenced this pull request in notional-labs/tendermint Apr 3, 2023
As of #419, we now use Go 1.20 on the `v0.37.x` branch.

This is already up-to-date on the `v0.37.x` branch itself: https://github.com/cometbft/cometbft/tree/v0.37.x#minimum-requirements

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
adrianbrink pushed a commit to heliaxdev/tendermint that referenced this pull request May 23, 2023
* Update to use Go 1.20 (tendermint#405)

* Bump minimum Go version to 1.20 in go.mod

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Bump minimum Go version in CI/test infra

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Bump Go version in docs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add changelog entry

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Ignore lint

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix math/rand usages in tests

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix lint: use local random source in test

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rename variable for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Bump version of golangci-lint to latest

Signed-off-by: Thane Thomson <connect@thanethomson.com>

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>
(cherry picked from commit 200784a)

# Conflicts:
#	.github/workflows/e2e-nightly-37x.yml
#	README.md
#	libs/rand/random.go
#	test/fuzz/README.md
#	test/fuzz/p2p/secret_connection/read_write.go
#	test/fuzz/tests/mempool_test.go
#	test/fuzz/tests/rpc_jsonrpc_server_test.go

* Resolve conflicts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove use of deprecated global random seed

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Attempt to appease linter

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Attempt 2 to appease linter

Signed-off-by: Thane Thomson <connect@thanethomson.com>

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants