func (storage *FileLogStorage) Close() error {
	return storage.file.Close()
}
Close simply closes internal file
package common
import (
	"io/ioutil"
	"os"
	"sync"
)
type FileLogStorage struct {
	file  *os.File
	mutex *sync.Mutex
}
func NewFileLogStorage(filePath string) (*FileLogStorage, error) {
	openedFile, err := os.OpenFile(filePath, os.O_APPEND|os.O_RDWR|os.O_CREATE, 0600)
	if err != nil {
		return nil, err
	}
	return &FileLogStorage{file: openedFile, mutex: &sync.Mutex{}}, nil
}
func (storage *FileLogStorage) ReadAll() ([]byte, error) {
	return ioutil.ReadFile(storage.file.Name())
}
func (storage *FileLogStorage) WriteAll(p []byte) error {
	storage.mutex.Lock()
	defer storage.mutex.Unlock()
	if err := storage.file.Truncate(0); err != nil {
		return err
	}
	_, err := storage.file.Write(p)
	if err != nil {
		return err
	}
	return nil
}
func (storage *FileLogStorage) Append(p []byte) error {
	storage.mutex.Lock()
	defer storage.mutex.Unlock()
	_, err := storage.file.Write(p)
	if err != nil {
		return err
	}
	return nil
}