Add config validation logs on application start

This commit is contained in:
TwinProduction
2020-09-22 17:46:40 -04:00
parent 4daf261d95
commit 286e8f8590
2 changed files with 44 additions and 7 deletions

View File

@ -50,7 +50,7 @@ type Service struct {
NumberOfSuccessesInARow int
}
func (service *Service) Validate() {
func (service *Service) ValidateAndSetDefaults() {
// Set default values
if service.Interval == 0 {
service.Interval = 1 * time.Minute