diff --git a/compose/types/validated.go b/compose/types/validated.go index 83c06703b..fdc691996 100644 --- a/compose/types/validated.go +++ b/compose/types/validated.go @@ -30,7 +30,12 @@ func (v *RecordValueErrorSet) IsValid() bool { } func (v *RecordValueErrorSet) Error() string { - return fmt.Sprintf("%d issue(s) found", len(v.Set)) + var no = 0 + if v != nil { + no = len(v.Set) + } + + return fmt.Sprintf("%d issue(s) found", no) } func (v RecordValueErrorSet) MarshalJSON() ([]byte, error) {