mirror of
https://github.com/foomo/contentfulvalidation.git
synced 2025-10-16 12:25:37 +00:00
ECOM-9587 fix: typo in package name
This commit is contained in:
parent
a5f121ca76
commit
8587014b12
@ -1,4 +1,4 @@
|
||||
package contants
|
||||
package constants
|
||||
|
||||
import (
|
||||
"github.com/foomo/contentfulvalidation/validator"
|
||||
@ -3,7 +3,7 @@ package utils
|
||||
import (
|
||||
"encoding/json"
|
||||
catvo "github.com/bestbytes/catalogue/vo"
|
||||
"github.com/foomo/contentfulvalidation/contants"
|
||||
"github.com/foomo/contentfulvalidation/constants"
|
||||
"github.com/foomo/contentfulvalidation/validator"
|
||||
"time"
|
||||
|
||||
@ -63,7 +63,7 @@ func InitEmptyValidationResult(modelType validator.ModelType, modelID validator.
|
||||
InternalTitle: internalTitle,
|
||||
LastUpdatedDate: lastUpdatedDate,
|
||||
ModelType: modelType,
|
||||
Health: contants.HealthOk,
|
||||
Health: constants.HealthOk,
|
||||
Messages: messages,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package validator
|
||||
|
||||
import "github.com/foomo/contentfulvalidation/contants"
|
||||
import "github.com/foomo/contentfulvalidation/constants"
|
||||
|
||||
type ValidationResult struct {
|
||||
ID ModelID `json:"id"`
|
||||
@ -30,12 +30,12 @@ func (result *ValidationResult) Log(severity Severity, message string, code Mess
|
||||
func (result *ValidationResult) UpdateHealth() {
|
||||
if len(result.Messages) > 0 {
|
||||
for _, msg := range result.Messages {
|
||||
if msg.Severity == contants.SeverityError || msg.Severity == contants.SeverityFatal {
|
||||
result.Health = contants.HealthError
|
||||
if msg.Severity == constants.SeverityError || msg.Severity == constants.SeverityFatal {
|
||||
result.Health = constants.HealthError
|
||||
return
|
||||
}
|
||||
if msg.Severity == contants.SeverityWarn {
|
||||
result.Health = contants.HealthWarn
|
||||
if msg.Severity == constants.SeverityWarn {
|
||||
result.Health = constants.HealthWarn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"github.com/foomo/contentfulvalidation/contants"
|
||||
"github.com/foomo/contentfulvalidation/constants"
|
||||
"github.com/foomo/contentfulvalidation/errors"
|
||||
"github.com/foomo/contentfulvalidation/utils"
|
||||
"strings"
|
||||
@ -93,8 +93,8 @@ func (v *Validator) MapListToCSV(modelType ModelType) (
|
||||
return "", err
|
||||
}
|
||||
|
||||
if v.Health != contants.HealthOk {
|
||||
date, err := utils.ConvertTimeFormat(v.LastUpdatedDate, time.RFC3339, contants.DateFormat)
|
||||
if v.Health != constants.HealthOk {
|
||||
date, err := utils.ConvertTimeFormat(v.LastUpdatedDate, time.RFC3339, constants.DateFormat)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user