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

feat: add more command utility functions #3

Merged
merged 2 commits into from
Nov 17, 2022

Conversation

baha-ai
Copy link
Contributor

@baha-ai baha-ai commented Nov 15, 2022

Signed-off-by: Baha Shaaban baha.shaaban@securekey.com

Signed-off-by: Baha Shaaban <baha.shaaban@securekey.com>
This change adds GetBool, GetInt, GetFloat, GetDuration and GetTLS utility functions

Signed-off-by: Baha Shaaban <baha.shaaban@securekey.com>
if tlsSystemCertPoolString != "" {
var err error

tlsSystemCertPool, err = strconv.ParseBool(tlsSystemCertPoolString)

Choose a reason for hiding this comment

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

You can use GetBool instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess parsing the actual value is better than calling GetBool and fetch the value from the arg flagName/envKey again

@baha-ai baha-ai merged commit 7ec1d42 into trustbloc:main Nov 17, 2022
@baha-ai baha-ai deleted the additional_utility branch November 17, 2022 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants