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 config validation #68

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

florianrusch
Copy link
Member

@florianrusch florianrusch commented Apr 28, 2024

implements #18

@florianrusch florianrusch marked this pull request as ready for review April 29, 2024 04:54
@florianrusch florianrusch requested a review from a-mesin April 29, 2024 04:54
@florianrusch florianrusch linked an issue Apr 29, 2024 that may be closed by this pull request
3 tasks
@florianrusch florianrusch added the enhancement New feature or request label Apr 29, 2024
@florianrusch florianrusch self-assigned this Apr 29, 2024
@github-actions github-actions bot added the ci label Apr 29, 2024
var c Config
if err := viper.Unmarshal(&c); err != nil {
slog.Error("unable to decode into struct", "error", err)
return nil, err
}

if err := validator.Validator.Struct(c); err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

I need to check, if also the resource configs will be validated here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add config validation
1 participant