added log file uploading and match results

This commit is contained in:
2026-02-21 22:25:21 +11:00
parent 2fee14680a
commit 9a143da972
20 changed files with 2595 additions and 61 deletions

View File

@@ -31,6 +31,25 @@ func newTimeField(key string, format *timefmt.Format, g Getter) *TimeField {
}
}
func newTimeFieldInLocation(key string, format *timefmt.Format, loc *time.Location, g Getter) *TimeField {
raw := g.Get(key)
var startDate time.Time
if raw != "" {
var err error
startDate, err = format.ParseInLocation(raw, loc)
if err != nil {
g.AddCheck(newFailedCheck(
"Invalid date/time format",
fmt.Sprintf("%s should be in format %s", key, format.LDML()),
))
}
}
return &TimeField{
Value: startDate,
FieldBase: newField(key, g),
}
}
func (t *TimeField) Required() *TimeField {
if t.Value.IsZero() {
t.getter.AddCheck(newFailedCheck(