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

[go] import command implemented #543

Merged
merged 5 commits into from
Mar 17, 2022
Merged

[go] import command implemented #543

merged 5 commits into from
Mar 17, 2022

Conversation

lucasreed
Copy link
Contributor

@lucasreed lucasreed commented Mar 17, 2022

This PR fixes #526

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

Added reckoner import functionality. I made the decision that this
output will always be in v2 schema format since we shouldn't support the
old style once the go version is released. That information is printed
as a warning when import is run.

releaseOut.Values = userValues
releaseOut.Repository = repository

// in order to set indent to 2 spaces we need to use a yaml encoder instead of yaml.Marshal
Copy link
Member

Choose a reason for hiding this comment

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

I thought this was fixed in Yaml v3 in the later versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It still seems to default to 4 spaces in my testing and I didn't see a way to change it in the library without opting for the encoder route. I can go look again.

Comment on lines +106 to +109
if len(splitChartVersion) < 2 {
return fmt.Errorf("could not parse chart version from %s - expected at least one hyphen between chart name and version", i.Chart)
}
splitPoint := len(splitChartVersion) - 1
Copy link
Member

Choose a reason for hiding this comment

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

They made this annoying to get, didn't they?

@sonarcloud
Copy link

sonarcloud bot commented Mar 17, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lucasreed lucasreed merged commit 337285d into master Mar 17, 2022
@lucasreed lucasreed deleted the lr/import_command branch March 17, 2022 18:12
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.

[Go version] Import command
2 participants