ECOM-9587 fix: typo in package name

This commit is contained in:
Daniel Thomas 2023-08-30 17:59:10 +02:00
parent a5f121ca76
commit 8587014b12
4 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
package contants package constants
import ( import (
"github.com/foomo/contentfulvalidation/validator" "github.com/foomo/contentfulvalidation/validator"

View File

@ -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,
} }
} }

View File

@ -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
} }
} }
} }

View File

@ -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
} }