Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed old CLI #608

Merged
merged 6 commits into from
Apr 8, 2021
Merged

Removed old CLI #608

merged 6 commits into from
Apr 8, 2021

Conversation

ziflex
Copy link
Member

@ziflex ziflex commented Apr 1, 2021

Closes #266

@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #608 (5720b95) into master (08e9054) will decrease coverage by 0.0%.
The diff coverage is 0.0%.

❗ Current head 5720b95 differs from pull request most recent head 4762644. Consider uploading reports for the commit 4762644 to get more accurate results

@@           Coverage Diff            @@
##           master    #608     +/-   ##
========================================
- Coverage    34.6%   34.6%   -0.0%     
========================================
  Files         327     328      +1     
  Lines       10170   10174      +4     
========================================
- Hits         3523    3521      -2     
- Misses       6272    6279      +7     
+ Partials      375     374      -1     

}
}

func (c *Container) HasDriver(name string) bool {
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to remove Driver word from Container's methods. The Container is in drivers package. Thus when we write Container.Has we know it means has driver

That's how Container calls looks in ferret.go:

// drivers 
for _, drv := range i.drivers.RegisteredDrivers() { ... }

How will it look like after remove:

for _, drv := range i.drivers.Registered() { ... }

In my opinion, the second code looks better

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to this way originally, but then I saw that Namespace interface has *Function, so to be consistent I decided to follow the pattern.

Copy link
Member

Choose a reason for hiding this comment

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

I think it will be consistent because namespace and function are different entities. It's ok to write Namespace.RegisteredFunctions() and Drivers.Registered together

e2e/cli.go Outdated
if err != nil {
fmt.Println(err)
os.Exit(1)
return
Copy link
Member

Choose a reason for hiding this comment

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

Can be removed because of os.Exit(1)

e2e/cli.go Outdated
if err != nil {
fmt.Println(err)
os.Exit(1)
return
Copy link
Member

Choose a reason for hiding this comment

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

Can be removed because of os.Exit(1)

@ziflex ziflex merged commit 8a77285 into master Apr 8, 2021
@ziflex ziflex deleted the feature/new-cli branch September 1, 2021 11:28
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.

Split CLI and runtime packages
2 participants