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

make the parse function more generic #369

Closed
yangcao77 opened this issue Mar 9, 2021 · 0 comments · Fixed by devfile/library#63
Closed

make the parse function more generic #369

yangcao77 opened this issue Mar 9, 2021 · 0 comments · Fixed by devfile/library#63
Assignees
Labels
area/library Common devfile library for interacting with devfiles kind/enhancement New feature or request
Projects

Comments

@yangcao77
Copy link
Contributor

devfile/libray currently has 4 parse functions ParseFromPath, ParseFromURL, ParseFromData, ParseRawDevfile
The logic of those 4 parse functions are similar, the only difference is that they take different parameter types.

The issue is to deprecate the existing parse functions, and create a new ParseDevfile, which combines the logic of those 4 functions. It should take an argument as following:

type ParserArgs struct {
	path             string
	url              string
	data             []byte
	flattenedDevfile *bool	// default to true
	registryURLs     []string
}

Populate() and PopulateFromURL() and PopulateFromRaw() should also be combined.

@yangcao77 yangcao77 added kind/enhancement New feature or request area/library Common devfile library for interacting with devfiles labels Mar 9, 2021
@yangcao77 yangcao77 self-assigned this Mar 9, 2021
@yangcao77 yangcao77 added this to Under consideration in Sprint 198 via automation Mar 9, 2021
@yangcao77 yangcao77 moved this from Under consideration to In progress in Sprint 198 Mar 9, 2021
@yangcao77 yangcao77 moved this from In progress to Review in progress in Sprint 198 Mar 9, 2021
Sprint 198 automation moved this from Review in progress to Done Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/library Common devfile library for interacting with devfiles kind/enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant