-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix:(issue_1197) Set destination field from altsrc for slice flags #1495
Conversation
2d63b24
to
c8dc60b
Compare
@dearchap Hi, I'm a little confused about Destination, I don't quite understand what it does |
Any flags value can be retrieved using ctx.XXXTypeName("flagName") or if the Destination field in the flag is set, that value. For example for
So if the flag is set on cmdline or from env you could do ctx.Int(foo) of do *ifg.Destination to get the value. |
Why not use Value? Is it because it is possible that the Value could be changed? Taking StringSlice as an example, in Lines 118 to 124 in 9120e06
|
Value is supplied by the user and is supposed to represent the default value(s) etc. User could supply a destination or not. So if it is specified it should match the Value |
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/CycloneDX/cyclonedx-go](https://togithub.com/CycloneDX/cyclonedx-go) | require | minor | `v0.6.0` -> `v0.7.0` | | [github.com/jedib0t/go-pretty/v6](https://togithub.com/jedib0t/go-pretty) | require | minor | `v6.3.9` -> `v6.4.0` | | [github.com/urfave/cli/v2](https://togithub.com/urfave/cli) | require | minor | `v2.16.3` -> `v2.17.1` | | [golang.org/x/crypto](https://togithub.com/golang/crypto) | require | digest | `eccd636` -> `4161e89` | | [golang.org/x/exp](https://togithub.com/golang/exp) | require | digest | `439092d` -> `b9f4876` | | [golang.org/x/term](https://togithub.com/golang/term) | require | digest | `7de9c90` -> `7a66f97` | --- ### Release Notes <details> <summary>CycloneDX/cyclonedx-go</summary> ### [`v0.7.0`](https://togithub.com/CycloneDX/cyclonedx-go/releases/tag/v0.7.0) [Compare Source](https://togithub.com/CycloneDX/cyclonedx-go/compare/v0.6.0...v0.7.0) #### Changelog ##### Features - [`acb9322`](https://togithub.com/CycloneDX/cyclonedx-go/commit/acb932270c1594cb44c052ebeacfe4400c25e30b): feat: add enum for official media types ([@​nscuro](https://togithub.com/nscuro)) - [`2826fe2`](https://togithub.com/CycloneDX/cyclonedx-go/commit/2826fe20711931e40df00c2d9058232b6c4ec8af): feat: add support for encoding to older spec versions ([#​51](https://togithub.com/CycloneDX/cyclonedx-go/issues/51)) ([@​nscuro](https://togithub.com/nscuro)) - [`7a2113a`](https://togithub.com/CycloneDX/cyclonedx-go/commit/7a2113a1d5cdbc27b170ce7a487cc13a108950f5): feat: raise baseline go version to 1.17 ([#​53](https://togithub.com/CycloneDX/cyclonedx-go/issues/53)) ([@​nscuro](https://togithub.com/nscuro)) - [`7415143`](https://togithub.com/CycloneDX/cyclonedx-go/commit/7415143fe9af48fafb4bd823cfd1dc1aaea9084e): feat: return error when parsing unknown spec versions ([@​nscuro](https://togithub.com/nscuro)) - [`1655b7d`](https://togithub.com/CycloneDX/cyclonedx-go/commit/1655b7dad8bb4e1cc7c402fac75dddf998dc5621): feat: set `SpecVersion` when decoding from xml ([@​nscuro](https://togithub.com/nscuro)) - [`f97e04a`](https://togithub.com/CycloneDX/cyclonedx-go/commit/f97e04a588544317e666deae16fbff4b4b1a89c5): feat: update gitpod dockerfile ([@​nscuro](https://togithub.com/nscuro)) ##### Fixes - [`ea0d5b7`](https://togithub.com/CycloneDX/cyclonedx-go/commit/ea0d5b79fe245884a46d7537271d0d951d46ad1a): fix: prevent nesting of `Dependency` ([@​nscuro](https://togithub.com/nscuro)) ##### Building and Packaging - [`f43660c`](https://togithub.com/CycloneDX/cyclonedx-go/commit/f43660c92e8aa58b574b90395330c2d423d87e54): build(deps): bump actions/setup-go from 3.1.0 to 3.2.0 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`2458312`](https://togithub.com/CycloneDX/cyclonedx-go/commit/245831215bceb60ad7c0b237819dadf6fb185a4e): build(deps): bump actions/setup-go from 3.2.0 to 3.2.1 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`760fae3`](https://togithub.com/CycloneDX/cyclonedx-go/commit/760fae3319dd04b9f95659eca5cada2dcedb885e): build(deps): bump actions/setup-go from 3.2.1 to 3.3.0 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`4dddf51`](https://togithub.com/CycloneDX/cyclonedx-go/commit/4dddf51ddd4be68d6c0f35adef628acd36eae0ab): build(deps): bump apache/skywalking-eyes from 0.3.0 to 0.4.0 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`6eb6521`](https://togithub.com/CycloneDX/cyclonedx-go/commit/6eb6521f71afc72eef65bf97033e1197a778ddab): build(deps): bump github.com/bradleyjkemp/cupaloy/v2 from 2.7.0 to 2.8.0 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`bff00ef`](https://togithub.com/CycloneDX/cyclonedx-go/commit/bff00ef23cf6cdcd520c179f995aabc83cc955b9): build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`fc11b56`](https://togithub.com/CycloneDX/cyclonedx-go/commit/fc11b56380ce3c547d34194a39c3ef736e6c8397): build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`f521d75`](https://togithub.com/CycloneDX/cyclonedx-go/commit/f521d75e187d6f2ca3ce289cfa4afbd961b04402): build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`d5d1ab6`](https://togithub.com/CycloneDX/cyclonedx-go/commit/d5d1ab6ca40e8ef882d6e51e1ebcb4ce72fcb805): build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 ([@​dependabot](https://togithub.com/dependabot)\[bot]) - [`b83bbe8`](https://togithub.com/CycloneDX/cyclonedx-go/commit/b83bbe808f6545654d4e0deecc7e7806a2e49c4e): build(deps): bump goreleaser/goreleaser-action from 2 to 3 ([@​dependabot](https://togithub.com/dependabot)\[bot]) ##### Documentation - [`8f8fadf`](https://togithub.com/CycloneDX/cyclonedx-go/commit/8f8fadfe296ad32dd78f513cd7475e81ed85e200): docs: fix cyclonedx-go version in compatibility matrix ([@​nscuro](https://togithub.com/nscuro)) - [`124f2be`](https://togithub.com/CycloneDX/cyclonedx-go/commit/124f2be91434d720dd5d3149d7ab04461405c207): docs: fix typos ([@​nscuro](https://togithub.com/nscuro)) ##### Others - [`5f10aea`](https://togithub.com/CycloneDX/cyclonedx-go/commit/5f10aea00cf46bbe3a4ce66ce2b85bd17576a35c): refactor: refine spec version conversion to cover more cases ([@​nscuro](https://togithub.com/nscuro)) - [`0c2ebff`](https://togithub.com/CycloneDX/cyclonedx-go/commit/0c2ebff85af58497076969010e3bb29f62f19f16): refactor: separate custom marshalling logic from model ([@​nscuro](https://togithub.com/nscuro)) </details> <details> <summary>jedib0t/go-pretty</summary> ### [`v6.4.0`](https://togithub.com/jedib0t/go-pretty/releases/tag/v6.4.0) [Compare Source](https://togithub.com/jedib0t/go-pretty/compare/v6.3.9...v6.4.0) ### Features - **progress** - option to set Pinned Message(s) above active Trackers (thanks to [@​iyear](https://togithub.com/iyear)) </details> <details> <summary>urfave/cli</summary> ### [`v2.17.1`](https://togithub.com/urfave/cli/releases/tag/v2.17.1) [Compare Source](https://togithub.com/urfave/cli/compare/v2.17.0...v2.17.1) #### What's Changed - Fix help results inconsistency by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1499](https://togithub.com/urfave/cli/pull/1499) **Full Changelog**: urfave/cli@v2.17.0...v2.17.1 ### [`v2.17.0`](https://togithub.com/urfave/cli/releases/tag/v2.17.0) [Compare Source](https://togithub.com/urfave/cli/compare/v2.16.6...v2.17.0) #### What's Changed - Flag-level Action by [@​xwjdsh](https://togithub.com/xwjdsh) in [https://github.com/urfave/cli/pull/1337](https://togithub.com/urfave/cli/pull/1337) #### New Contributors - [@​xwjdsh](https://togithub.com/xwjdsh) made their first contribution in [https://github.com/urfave/cli/pull/1337](https://togithub.com/urfave/cli/pull/1337) **Full Changelog**: urfave/cli@v2.16.6...v2.17.0 ### [`v2.16.6`](https://togithub.com/urfave/cli/releases/tag/v2.16.6) [Compare Source](https://togithub.com/urfave/cli/compare/v2.16.5...v2.16.6) #### What's Changed - fix: Context.Set no such flag by [@​Torwang1](https://togithub.com/Torwang1) in [https://github.com/urfave/cli/pull/1497](https://togithub.com/urfave/cli/pull/1497) #### New Contributors - [@​Torwang1](https://togithub.com/Torwang1) made their first contribution in [https://github.com/urfave/cli/pull/1497](https://togithub.com/urfave/cli/pull/1497) **Full Changelog**: urfave/cli@v2.16.5...v2.16.6 ### [`v2.16.5`](https://togithub.com/urfave/cli/releases/tag/v2.16.5) [Compare Source](https://togithub.com/urfave/cli/compare/v2.16.4...v2.16.5) #### What's Changed - Fix:(issue\_1197) Set destination field from altsrc for slice flags by [@​dearchap](https://togithub.com/dearchap) in [https://github.com/urfave/cli/pull/1495](https://togithub.com/urfave/cli/pull/1495) **Full Changelog**: urfave/cli@v2.16.4...v2.16.5 ### [`v2.16.4`](https://togithub.com/urfave/cli/releases/tag/v2.16.4) [Compare Source](https://togithub.com/urfave/cli/compare/v2.16.3...v2.16.4) #### What's Changed - Accept the `MKDOCS_REMOTE_GITHUB_TOKEN` var as intended by [@​meatballhat](https://togithub.com/meatballhat) in [https://github.com/urfave/cli/pull/1493](https://togithub.com/urfave/cli/pull/1493) **Full Changelog**: urfave/cli@v2.16.3...v2.16.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on monday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/google/osv.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTMuMCIsInVwZGF0ZWRJblZlciI6IjMyLjIxNi4wIn0=--> Co-authored-by: Rex P <[email protected]>
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
Which issue(s) this PR fixes:
(REQUIRED)
Special notes for your reviewer:
(fill-in or delete this section)
Testing
(fill-in or delete this section)
Tested with user provided code. Will add unit tests to confirm this.
Release Notes
(REQUIRED)