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

Kpt location parsing #2688

Merged
merged 11 commits into from
Feb 3, 2022
Merged

Kpt location parsing #2688

merged 11 commits into from
Feb 3, 2022

Commits on Feb 1, 2022

  1. Building block for parsing arg location

    - location.ParseReference to be used by CLI where string arg is taken
    - may be used by callers that needs similar arg parsing/muxing
    - callers which have strongly-typed data  initialize
      types like location.Git{...} and location.Oci{...}
    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    9605501 View commit details
    Browse the repository at this point in the history
  2. Adding test coverage for parsing "-" arg

    - using WithStdin and WithStdout option must be added by the caller
    
    - if they are both present on all calls to ParseReference, then the
    location returned for "-" would be ambiguous. it depends on which
    switch or argument is being parsed.
    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    0f0e16f View commit details
    Browse the repository at this point in the history
  3. Fixing PR errors related to best practices

    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    f2d8279 View commit details
    Browse the repository at this point in the history
  4. Another update for PR coding standard

    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    4860a52 View commit details
    Browse the repository at this point in the history
  5. Adding details needed by kpg pkg get

    - location.Reference gets Type() and Validate()
    - kptfileutils has method to make kptfilev1 types from ref and reflock
    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    96c66d9 View commit details
    Browse the repository at this point in the history
  6. Selection of parsers is now controlled by options

    - for kpt CLI it enables parse to be used for many different args
    - for external code, enables custom and standard parsing together
    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    1cec6c8 View commit details
    Browse the repository at this point in the history
  7. Adding comments and returning bool from trivial func

    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    9b37c61 View commit details
    Browse the repository at this point in the history
  8. Adding headers

    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    987db2d View commit details
    Browse the repository at this point in the history
  9. Using lock instead of string for argument name

    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    1588d92 View commit details
    Browse the repository at this point in the history
  10. Using filepath.Clean before creating location.Dir{}

    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    b46eb25 View commit details
    Browse the repository at this point in the history
  11. Changing parsers to clarify semantics

    - Parser and Option split into two concepts
    - Single WithParsers option now takes ordered parsers
    - StdioParser adjusted so WithStdin and WithStdout options
    are not sensitive to parser order
    - the parser result struct documented to clarify what to return and
    how they combine
    Louis DeJardin committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    6891e1c View commit details
    Browse the repository at this point in the history