code: func (i *IndentedInspector) Flush() error {
  	if len(i.elements) == 0 && len(i.rawElements) == 0 {
  		_, err := io.WriteString(i.outputStream, "[]\n")
  		return err
  	}
  
  	var buffer io.Reader
  	if len(i.rawElements) > 0 {
  		bytesBuffer := new(bytes.Buffer)
  		bytesBuffer.WriteString("[")
  		for idx, r := range i.rawElements {
  			bytesBuffer.Write(r)
  			if idx < len(i.rawElements)-1 {
  				bytesBuffer.WriteString(",")
  			}
  		}
  		bytesBuffer.WriteString("]")
  		indented := new(bytes.Buffer)
  		if err := json.Indent(indented, bytesBuffer.Bytes(), "", "    "); err != nil {
  			return err
  		}
  		buffer = indented
  	} else {
  		b, err := json.MarshalIndent(i.elements, "", "    ")
  		if err != nil {
  			return err
  		}
  		buffer = bytes.NewReader(b)
  	}
  
  	if _, err := io.Copy(i.outputStream, buffer); err != nil {
  		return err
  	}
  	_, err := io.WriteString(i.outputStream, "\n")
  	return err
  }
docs: // Flush writes the result of inspecting all elements into the output stream.