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

Adds support for uint16 with GetUint16 #1405

Merged
merged 1 commit into from Sep 4, 2022
Merged

Conversation

oxisto
Copy link

@oxisto oxisto commented Jul 19, 2022

We have encountered numerous places where it is convenient to have viper return a uint16 value, especially in combination with the new netip package that represents a port correctly as uint16 rather than just an int. cobra already supports this, but we need a conversion from the existing GetUint method in viper.

@CLAassistant
Copy link

CLAassistant commented Jul 19, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

👋 Thanks for contributing to Viper! You are awesome! 🎉

A maintainer will take a look at your pull request shortly. 👀

In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.

If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9

📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:

https://twitter.com/sagikazarmark/status/1306904078967074816

Thank you! ❤️

@sagikazarmark sagikazarmark added this to the v1.13.0 milestone Sep 3, 2022
@sagikazarmark sagikazarmark added the kind/enhancement New feature or request label Sep 3, 2022
Copy link
Collaborator

@sagikazarmark sagikazarmark left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @oxisto

Copy link
Collaborator

@sagikazarmark sagikazarmark left a comment

Choose a reason for hiding this comment

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

@oxisto actually, can you please rebase your PR to trigger CI?

We have encountered numerous places where it is convenient to have viper return a `uint16` value, especially in combination with the new `netip` package  that represents a port correctly as `uint16` rather than just an `int`. cobra already supports this, but we need a conversion from the existing `GetUint` method in viper.
@oxisto
Copy link
Author

oxisto commented Sep 3, 2022

@oxisto actually, can you please rebase your PR to trigger CI?

done.

Copy link
Collaborator

@sagikazarmark sagikazarmark left a comment

Choose a reason for hiding this comment

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

Thanks!

@sagikazarmark sagikazarmark merged commit 202060b into spf13:master Sep 4, 2022
51 checks passed
estahn pushed a commit to estahn/k8s-image-swapper that referenced this pull request Sep 7, 2022
## [1.3.0](v1.2.3...v1.3.0) (2022-09-07)

### 🎉 Features

* cross account caching with role ([#336](#336)) ([98d138e](98d138e))

### ⬆️ Dependencies

* **deps:** bump actions/cache from 3.0.6 to 3.0.8 ([#319](#319)) ([245ab30](245ab30)), closes [#809](https://github.com/estahn/k8s-image-swapper/issues/809) [#833](https://github.com/estahn/k8s-image-swapper/issues/833) [#810](https://github.com/estahn/k8s-image-swapper/issues/810) [#888](https://github.com/estahn/k8s-image-swapper/issues/888) [#891](https://github.com/estahn/k8s-image-swapper/issues/891) [#899](https://github.com/estahn/k8s-image-swapper/issues/899) [#894](https://github.com/estahn/k8s-image-swapper/issues/894)
* **deps:** bump alpine from 3.16.1 to 3.16.2 ([da05fdd](da05fdd))
* **deps:** bump github.com/alitto/pond from 1.8.0 to 1.8.1 ([#342](#342)) ([4e50c28](4e50c28)), closes [alitto/pond#33](alitto/pond#33) [#34](#34) [#32](#32)
* **deps:** bump github.com/aws/aws-sdk-go from 1.44.70 to 1.44.92 ([0f396c5](0f396c5))
* **deps:** bump github.com/aws/aws-sdk-go from 1.44.70 to 1.44.92 ([#338](#338)) ([fa795ae](fa795ae)), closes [#4548](https://github.com/estahn/k8s-image-swapper/issues/4548) [#4546](https://github.com/estahn/k8s-image-swapper/issues/4546) [#4545](https://github.com/estahn/k8s-image-swapper/issues/4545) [#4544](https://github.com/estahn/k8s-image-swapper/issues/4544) [#4543](https://github.com/estahn/k8s-image-swapper/issues/4543) [#4542](https://github.com/estahn/k8s-image-swapper/issues/4542) [#4539](https://github.com/estahn/k8s-image-swapper/issues/4539) [#4536](https://github.com/estahn/k8s-image-swapper/issues/4536) [#4534](https://github.com/estahn/k8s-image-swapper/issues/4534) [#4533](https://github.com/estahn/k8s-image-swapper/issues/4533)
* **deps:** bump github.com/go-co-op/gocron from 1.16.2 to 1.17.0 ([#340](#340)) ([645bef3](645bef3)), closes [go-co-op/gocron#380](go-co-op/gocron#380) [go-co-op/gocron#381](go-co-op/gocron#381) [go-co-op/gocron#375](go-co-op/gocron#375) [#381](#381) [#380](#380) [#375](#375)
* **deps:** bump github.com/gruntwork-io/terratest from 0.40.19 to 0.40.21 ([#334](#334)) ([d0f6c39](d0f6c39)), closes [#1166](https://github.com/estahn/k8s-image-swapper/issues/1166) [#1159](https://github.com/estahn/k8s-image-swapper/issues/1159)
* **deps:** bump github.com/rs/zerolog from 1.27.0 to 1.28.0 ([#339](#339)) ([7fb4ff5](7fb4ff5)), closes [#457](https://github.com/estahn/k8s-image-swapper/issues/457) [#416](#416) [#454](https://github.com/estahn/k8s-image-swapper/issues/454) [#453](https://github.com/estahn/k8s-image-swapper/issues/453) [#383](#383) [#396](#396) [#414](#414) [#415](#415) [#430](#430) [#432](#432)
* **deps:** bump github.com/spf13/viper from 1.12.0 to 1.13.0 ([#341](#341)) ([9b59bd4](9b59bd4)), closes [spf13/viper#1371](spf13/viper#1371) [spf13/viper#1373](spf13/viper#1373) [spf13/viper#1393](spf13/viper#1393) [spf13/viper#1424](spf13/viper#1424) [spf13/viper#1405](spf13/viper#1405) [spf13/viper#1414](spf13/viper#1414) [spf13/viper#1387](spf13/viper#1387) [spf13/viper#1374](spf13/viper#1374) [spf13/viper#1375](spf13/viper#1375) [spf13/viper#1378](spf13/viper#1378) [spf13/viper#1360](spf13/viper#1360) [spf13/viper#1381](spf13/viper#1381) [spf13/viper#1384](spf13/viper#1384) [spf13/viper#1383](spf13/viper#1383) [spf13/viper#1395](spf13/viper#1395) [spf13/viper#1420](spf13/viper#1420) [spf13/viper#1422](spf13/viper#1422) [spf13/viper#1412](spf13/viper#1412) [spf13/viper#1373](spf13/viper#1373) [spf13/viper#1393](spf13/viper#1393) [spf13/viper#1371](spf13/viper#1371) [spf13/viper#1387](spf13/viper#1387) [spf13/viper#1405](spf13/viper#1405) [spf13/viper#1414](spf13/viper#1414)
* **deps:** bump goreleaser/goreleaser-action from 3.0.0 to 3.1.0 ([#328](#328)) ([a8d2dd1](a8d2dd1)), closes [#369](#369) [#357](#357) [#356](#356) [#360](#360) [#359](#359) [#358](#358) [#367](#367) [#369](#369) [#367](#367) [#358](#358) [#359](#359) [#360](#360) [#357](#357) [#356](#356)
* **deps:** bump k8s.io/api from 0.24.3 to 0.25.0 ([#325](#325)) ([ce10907](ce10907)), closes [#111657](https://github.com/estahn/k8s-image-swapper/issues/111657) [#109090](https://github.com/estahn/k8s-image-swapper/issues/109090) [#111258](https://github.com/estahn/k8s-image-swapper/issues/111258) [#111113](https://github.com/estahn/k8s-image-swapper/issues/111113) [#111696](https://github.com/estahn/k8s-image-swapper/issues/111696) [#108692](https://github.com/estahn/k8s-image-swapper/issues/108692)
* **deps:** bump k8s.io/client-go from 0.24.3 to 0.25.0 ([#324](#324)) ([f7c889f](f7c889f))
kurtisvg pushed a commit to googleapis/btlr that referenced this pull request Jan 5, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/spf13/viper](https://togithub.com/spf13/viper) | require |
minor | `v1.12.0` -> `v1.14.0` |

---

### Release Notes

<details>
<summary>spf13/viper</summary>

### [`v1.14.0`](https://togithub.com/spf13/viper/releases/tag/v1.14.0)

[Compare
Source](https://togithub.com/spf13/viper/compare/v1.13.0...v1.14.0)

<!-- Release notes generated using configuration in .github/release.yml
at v1.14.0 -->

##### What's Changed

##### Enhancements 🚀

- feat: make Viper compile on platforms unsupported by fsnotify by
[@&#8203;sagikazarmark](https://togithub.com/sagikazarmark) in
[spf13/viper#1457
- Fsnotify improvements by
[@&#8203;sagikazarmark](https://togithub.com/sagikazarmark) in
[spf13/viper#1458
- Disable watch on appengine by
[@&#8203;sagikazarmark](https://togithub.com/sagikazarmark) in
[spf13/viper#1460

##### Breaking Changes 🛠

- Drop support for Go 1.15 by
[@&#8203;sagikazarmark](https://togithub.com/sagikazarmark) in
[spf13/viper#1428

##### Dependency Updates ⬆️

- build(deps): bump github.com/spf13/afero from 1.8.2 to 1.9.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1406
- build(deps): bump github.com/sagikazarmark/crypt from 0.6.0 to 0.7.0
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1437
- build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1453
- build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1449
- chore: update crypt by
[@&#8203;sagikazarmark](https://togithub.com/sagikazarmark) in
[spf13/viper#1461

**Full Changelog**:
spf13/viper@v1.13.0...v1.14.0

### [`v1.13.0`](https://togithub.com/spf13/viper/releases/tag/v1.13.0)

[Compare
Source](https://togithub.com/spf13/viper/compare/v1.12.0...v1.13.0)

**Important:** This is the last release supporting Go 1.15.

#### What's Changed

##### Exciting New Features 🎉

- Add etcd3 to supported remote providers by
[@&#8203;franklinkim](https://togithub.com/franklinkim) in
[spf13/viper#1371

##### Enhancements 🚀

- Fix go-staticcheck failures (ST1005) by
[@&#8203;mjmaisey](https://togithub.com/mjmaisey) in
[spf13/viper#1373
- Use jsonc in markdown codeblocks for better readability by
[@&#8203;HurSungYun](https://togithub.com/HurSungYun) in
[spf13/viper#1393
- Add Go 1.19 support by
[@&#8203;sagikazarmark](https://togithub.com/sagikazarmark) in
[spf13/viper#1424
- Adds support for uint16 with `GetUint16` by
[@&#8203;oxisto](https://togithub.com/oxisto) in
[spf13/viper#1405
- Add a DebugTo convenience funtion by
[@&#8203;bcrochet](https://togithub.com/bcrochet) in
[spf13/viper#1414

##### Bug Fixes 🐛

- Recurse into arrays when converting keys to lowercase by
[@&#8203;awrichar](https://togithub.com/awrichar) in
[spf13/viper#1387

##### Dependency Updates ⬆️

- build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1374
- build(deps): bump github.com/subosito/gotenv from 1.3.0 to 1.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1375
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.1 to 2.0.2
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1378
- build(deps): bump gopkg.in/yaml.v3 from 3.0.0 to 3.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1360
- build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1381
- build(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1384
- build(deps): bump mheap/github-action-required-labels from 1 to 2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1383
- build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.8.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1395
- build(deps): bump github.com/subosito/gotenv from 1.4.0 to 1.4.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1420
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.2 to 2.0.5
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1422
- build(deps): bump gopkg.in/ini.v1 from 1.66.4 to 1.67.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[spf13/viper#1412

#### New Contributors

- [@&#8203;mjmaisey](https://togithub.com/mjmaisey) made their first
contribution in
[spf13/viper#1373
- [@&#8203;HurSungYun](https://togithub.com/HurSungYun) made their first
contribution in
[spf13/viper#1393
- [@&#8203;franklinkim](https://togithub.com/franklinkim) made their
first contribution in
[spf13/viper#1371
- [@&#8203;awrichar](https://togithub.com/awrichar) made their first
contribution in
[spf13/viper#1387
- [@&#8203;oxisto](https://togithub.com/oxisto) made their first
contribution in
[spf13/viper#1405
- [@&#8203;bcrochet](https://togithub.com/bcrochet) made their first
contribution in
[spf13/viper#1414

**Full Changelog**:
spf13/viper@v1.12.0...v1.13.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

 **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

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/googleapis/btlr).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xOTIuMiIsInVwZGF0ZWRJblZlciI6IjM0LjI4LjAifQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants