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 (
|
import (
|
||||||
"github.com/foomo/contentfulvalidation/validator"
|
"github.com/foomo/contentfulvalidation/validator"
|
||||||
@ -3,7 +3,7 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
catvo "github.com/bestbytes/catalogue/vo"
|
catvo "github.com/bestbytes/catalogue/vo"
|
||||||
"github.com/foomo/contentfulvalidation/contants"
|
"github.com/foomo/contentfulvalidation/constants"
|
||||||
"github.com/foomo/contentfulvalidation/validator"
|
"github.com/foomo/contentfulvalidation/validator"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ func InitEmptyValidationResult(modelType validator.ModelType, modelID validator.
|
|||||||
InternalTitle: internalTitle,
|
InternalTitle: internalTitle,
|
||||||
LastUpdatedDate: lastUpdatedDate,
|
LastUpdatedDate: lastUpdatedDate,
|
||||||
ModelType: modelType,
|
ModelType: modelType,
|
||||||
Health: contants.HealthOk,
|
Health: constants.HealthOk,
|
||||||
Messages: messages,
|
Messages: messages,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package validator
|
package validator
|
||||||
|
|
||||||
import "github.com/foomo/contentfulvalidation/contants"
|
import "github.com/foomo/contentfulvalidation/constants"
|
||||||
|
|
||||||
type ValidationResult struct {
|
type ValidationResult struct {
|
||||||
ID ModelID `json:"id"`
|
ID ModelID `json:"id"`
|
||||||
@ -30,12 +30,12 @@ func (result *ValidationResult) Log(severity Severity, message string, code Mess
|
|||||||
func (result *ValidationResult) UpdateHealth() {
|
func (result *ValidationResult) UpdateHealth() {
|
||||||
if len(result.Messages) > 0 {
|
if len(result.Messages) > 0 {
|
||||||
for _, msg := range result.Messages {
|
for _, msg := range result.Messages {
|
||||||
if msg.Severity == contants.SeverityError || msg.Severity == contants.SeverityFatal {
|
if msg.Severity == constants.SeverityError || msg.Severity == constants.SeverityFatal {
|
||||||
result.Health = contants.HealthError
|
result.Health = constants.HealthError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if msg.Severity == contants.SeverityWarn {
|
if msg.Severity == constants.SeverityWarn {
|
||||||
result.Health = contants.HealthWarn
|
result.Health = constants.HealthWarn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package validator
|
package validator
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/foomo/contentfulvalidation/contants"
|
"github.com/foomo/contentfulvalidation/constants"
|
||||||
"github.com/foomo/contentfulvalidation/errors"
|
"github.com/foomo/contentfulvalidation/errors"
|
||||||
"github.com/foomo/contentfulvalidation/utils"
|
"github.com/foomo/contentfulvalidation/utils"
|
||||||
"strings"
|
"strings"
|
||||||
@ -93,8 +93,8 @@ func (v *Validator) MapListToCSV(modelType ModelType) (
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
if v.Health != contants.HealthOk {
|
if v.Health != constants.HealthOk {
|
||||||
date, err := utils.ConvertTimeFormat(v.LastUpdatedDate, time.RFC3339, contants.DateFormat)
|
date, err := utils.ConvertTimeFormat(v.LastUpdatedDate, time.RFC3339, constants.DateFormat)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user