func (o *jsono) Write(result validator.Result) error {
	msg, st := "", ""

	switch result.Status {
	case validator.Valid:
		st = "statusValid"
		o.nValid++
	case validator.Invalid:
		st = "statusInvalid"
		msg = result.Err.Error()
		o.nInvalid++
	case validator.Error:
		st = "statusError"
		msg = result.Err.Error()
		o.nErrors++
	case validator.Skipped:
		st = "statusSkipped"
		o.nSkipped++
	case validator.Empty:
	}

	if o.verbose || (result.Status != validator.Valid && result.Status != validator.Skipped && result.Status != validator.Empty) {
		sig, _ := result.Resource.Signature()
		o.results = append(o.results, oresult{Filename: result.Resource.Path, Kind: sig.Kind, Name: sig.Name, Version: sig.Version, Status: st, Msg: msg})
	}

	return nil
}
// JSON.Write will only write when JSON.Flush has been called
JSON.Write will only write when JSON.Flush has been called
// JSON . Write will only write when JSON . Flush has been called
func (o *jsono) Write(result validator.Result) error {
	msg, st := "", ""
	switch result.Status {
	case validator.Valid:
		st = "statusValid"
		o.nValid++
	case validator.Invalid:
		st = "statusInvalid"
		msg = result.Err.Error()
		o.nInvalid++
	case validator.Error:
		st = "statusError"
		msg = result.Err.Error()
		o.nErrors++
	case validator.Skipped:
		st = "statusSkipped"
		o.nSkipped++
	case validator.Empty:
	}
	if o.verbose || (result.Status != validator.Valid && result.Status != validator.Skipped && result.Status != validator.Empty) {
		sig, _ := result.Resource.Signature()
		o.results = append(o.results, oresult{Filename: result.Resource.Path, Kind: sig.Kind, Name: sig.Name, Version: sig.Version, Status: st, Msg: msg})
	}
	return nil
}
func ( o * jsono ) Write ( result validator . Result ) error { msg , st := " " , " " switch result . Status { case validator . Valid : st = " " o . nValid ++ case validator . Invalid : st = " " msg = result . Err . Error ( ) o . nInvalid ++ case validator . Error : st = " " msg = result . Err . Error ( ) o . nErrors ++ case validator . Skipped : st = " " o . nSkipped ++ case validator . Empty : } if o . verbose || ( result . Status != validator . Valid && result . Status != validator . Skipped && result . Status != validator . Empty ) { sig , _ := result . Resource . Signature ( ) o . results = append ( o . results , oresult { Filename : result . Resource . Path , Kind : sig . Kind , Name : sig . Name , Version : sig . Version , Status : st , Msg : msg } ) } return nil }
JSON.Write will only write when JSON.Flush has been called
JSON . Write will only write when JSON . Flush has been called