func (s *stdoutSender) Close() error {
	log.Infof("Messages successfully sent by the stdoutSender: %d", s.count)
	return nil
}
Close prints the number of messages that have been sent.
package hl7
import (
	"bytes"
	"fmt"
	"net"
	"os"
	"syscall"
	"time"
	"github.com/pkg/errors"
)
type Sender interface {
	Send([]byte) error
	Close() error
}
type stdoutSender struct {
	count int
}
func NewStdoutSender() Sender {
	return &stdoutSender{}
}
func (s *stdoutSender) Send(message []byte) error {
	fmt.Print(string(bytes.Replace(message, []byte(SegmentTerminatorStr), []byte("\n"), -1)))
	fmt.Print("\n")
	s.count++
	return nil
}