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

feat(pkger): add jsonnet support for package files #16511

Merged
merged 1 commit into from
Jan 13, 2020

Conversation

jsteenb2
Copy link
Contributor

@jsteenb2 jsteenb2 commented Jan 12, 2020

Clearing up some idea debt. Adds jsonnet support for influx packages.

@jsteenb2 jsteenb2 force-pushed the pkger/jsonnet_support branch 2 times, most recently from 4fe5c4d to 8322ef5 Compare January 12, 2020 18:00
@jsteenb2 jsteenb2 requested review from a team as code owners January 12, 2020 18:00
@jsteenb2 jsteenb2 requested review from a team and removed request for a team January 12, 2020 18:01
@@ -138,8 +148,14 @@ func parseSource(r io.Reader, opts ...ValidateOptFn) (*Pkg, error) {
switch {
case strings.Contains(contentType, "json"):
return parseJSON(bytes.NewReader(b), opts...)
default:
case strings.Contains(contentType, "jsonnet"):
Copy link
Contributor

Choose a reason for hiding this comment

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

strings.Contains(contentType, "json") will always be true, even if the "content-type" is "jsonnet"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohhhh great catch 🥇, will fix that up 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kelwang push fixed

Copy link
Contributor

@kelwang kelwang left a comment

Choose a reason for hiding this comment

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

small bug, others looks good

@jsteenb2 jsteenb2 merged commit fe12fd0 into master Jan 13, 2020
@jsteenb2 jsteenb2 deleted the pkger/jsonnet_support branch January 13, 2020 17:55
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