chore(deps): bump github.com/onsi/gomega from 1.39.0 to 1.39.1
Bumps github.com/onsi/gomega from 1.39.0 to 1.39.1.
updated-dependencies:
- dependency-name: github.com/onsi/gomega dependency-version: 1.39.1 dependency-type: direct:production update-type: version-update:semver-patch …
Signed-off-by: dependabot[bot] support@github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
envstruct
If you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack
envstruct is a simple library for populating values on structs from environment variables.
Usage
Export some environment variables.
Note: The environment variables are case sensitive. The casing of the set environment variable must match the casing in the struct tag.
Write some code. In this example,
IPrequires that theHOST_IPenvironment variable is set to non empty value andPortdefaults to80ifHOST_PORTis an empty value. Then we use theenvstruct.WriteReport()to print a table with a report of what fields are on the struct, the type, the environment variable where the value is read from, whether or not it is required, and the value. All values are omitted by default, if you wish to display the value for a field you can addreportto theenvstruct tag.Run your code and rejoice!
Supported Types
trueand1results in true value, anything else results in false value)key:value. Keys cannot contain colons and neither key nor value can contain commas. e.g.key_one:value_one, key_two:value_twoRunning Tests
Run tests using ginkgo.