func init() {
	watchDirCacher.cache = make(map[string]*FileManager)
	l = logger.InitLogger(&logger.LogParams{LogPrefix: "[FM] "})
}
	"time"

	"github.com/Bnei-Baruch/mms-file-manager/config"
	"github.com/Bnei-Baruch/mms-file-manager/models"
	fm "github.com/Bnei-Baruch/mms-file-manager/services/file_manager"
	"github.com/Bnei-Baruch/mms-file-manager/services/logger"
	"github.com/Bnei-Baruch/mms-file-manager/utils"
	"github.com/chuckpreslar/gofer"
	"github.com/jinzhu/gorm"
	"github.com/joho/godotenv"
	"github.com/smartystreets/assertions"
	. "github.com/smartystreets/goconvey/convey"
)

var (
	l                     *log.Logger = logger.InitLogger(&logger.LogParams{LogMode: "screen", LogPrefix: "[FM-TEST] "})
	db                    *gorm.DB
	watchDir1, targetDir1 = "tmp/source1", "tmp/target1"
	watchFile1            = filepath.Join(watchDir1, "file1.txt")
	targetFile1v1         = filepath.Join(targetDir1, "*/*/v01/file1.txt")
	targetFile1v2         = filepath.Join(targetDir1, "*/*/v02/file1.txt")

	watchDir2, targetDir2 = "tmp/source2", "tmp/target2"
	watchFile2            = filepath.Join(watchDir2, "file2.txt")
	targetFile2v1         = filepath.Join(targetDir2, "*/*/v01/file2.txt")

	fileManager  *fm.FileManager = nil
	fileManager2 *fm.FileManager = nil
	err          error
)
func Logger(params *logger.LogParams) {
	l = logger.InitLogger(params)
}
Esempio n. 4
0
func init() {
	l = logger.InitLogger(&logger.LogParams{LogPrefix: "[MODEL] "})
}