Skip to content

Add two flush method#54

Open
waters222 wants to merge 3 commits into
coreos:mainfrom
waters222:master
Open

Add two flush method#54
waters222 wants to merge 3 commits into
coreos:mainfrom
waters222:master

Conversation

@waters222

Copy link
Copy Markdown
  1. Add flush table method.
  2. Add flush chain method.

@squeed

squeed commented Sep 12, 2018

Copy link
Copy Markdown
Contributor

Two things:

  1. Please add tests
  2. It looks like this broke gofmt - please reformat.

@squeed

squeed commented Sep 12, 2018

Copy link
Copy Markdown
Contributor

but thanks for the submission!

@waters222

Copy link
Copy Markdown
Author

I did gofmt on the code and add test case for FlushChain.

@squeed

squeed commented Sep 19, 2018

Copy link
Copy Markdown
Contributor

Is there any reason you can't use ClearChain?

@waters222

Copy link
Copy Markdown
Author
  1. ClearChain leave an empty chain or newly create chain in the end, which sometimes its not the use case for me.
  2. FlushChain provide an alternative method to manipulate chain for certain case, but I think by using ClearChain can do the same with some modified code.
  3. I think ClearChain is bit too high level which include two commands. I think simpler is good.

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.

2 participants