You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
funcloadCryptoConfigFromLookuper(ctx context.Context, b []byte, lookuper envconfig.Lookuper) (*CryptoConfig, error) {
.
We can do refactor to avoid duplicates.
Detailed design
Create a common function which handles loading config from env with any parameter. The caller of the common function need to pass the pointer of specific config like PublicKeyConfig or CryptoConfig as the value of any parameter.
Alternatives considered
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
TL;DR
There are some duplicates when loading config from env, do validation and set defaults.
https://github.com/abcxyz/jvs/blob/main/pkg/config/public_key_config.go#L43 and
jvs/pkg/config/crypto_config.go
Line 102 in 23cdda1
We can do refactor to avoid duplicates.
Detailed design
Create a common function which handles loading config from env with
any
parameter. The caller of the common function need to pass the pointer of specific config likePublicKeyConfig
orCryptoConfig
as the value ofany
parameter.Alternatives considered
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: