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

Small refactorings for better code structure #223

Merged

Conversation

corneliusweig
Copy link
Contributor

This PR includes some small refactorings which originally were part of #195 . In particular:

  • move the expected ending for manifests into a code constant
  • check that this code constant is not used outside of constants.go
  • move the logic to match a target platform out of installation and into the index package.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 25, 2019
@codecov-io
Copy link

codecov-io commented Jun 25, 2019

Codecov Report

Merging #223 into master will decrease coverage by 0.57%.
The diff coverage is 79.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #223      +/-   ##
==========================================
- Coverage   54.35%   53.78%   -0.58%     
==========================================
  Files          13       14       +1     
  Lines         701      701              
==========================================
- Hits          381      377       -4     
- Misses        269      273       +4     
  Partials       51       51
Impacted Files Coverage Δ
pkg/installation/util.go 44.89% <100%> (-15.92%) ⬇️
cmd/validate-krew-manifest/main.go 58.33% <100%> (ø) ⬆️
pkg/index/indexscanner/scanner.go 67.34% <100%> (ø) ⬆️
pkg/index/platform.go 76% <76%> (ø)

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 cc140f1...14f2c19. Read the comment docs.

@@ -19,10 +19,12 @@ import (
"strings"

"github.com/pkg/errors"

"sigs.k8s.io/krew/pkg/index/indexscanner"
Copy link
Member

@ahmetb ahmetb Jun 25, 2019

Choose a reason for hiding this comment

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

seems like this import should be on the next block. (conflicts with #222)

@ahmetb
Copy link
Member

ahmetb commented Jun 25, 2019

Small comments.
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmetb, corneliusweig

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 25, 2019
@ahmetb
Copy link
Member

ahmetb commented Jun 25, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 25, 2019
@k8s-ci-robot k8s-ci-robot merged commit 4b0255c into kubernetes-sigs:master Jun 25, 2019
@corneliusweig corneliusweig deleted the w/core-refactorings branch June 25, 2019 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants