Versions in this module Expand all Collapse all v0 v0.2.2 May 28, 2022 Changes in this version + func BackupFile(filePath string) (newPath string, err error) + func BashExec(cmd string) (output string, err error) + func FindOldFiles(Paths []string, n int) (oldFiles []string) + func KeepBackup(path string, num int) + func RestoreFile(filePath, BackupPath string) error + type CommandHook struct + Commands []string + Mode string + func (c CommandHook) Do() error + type FileUpdater struct + Backup bool + FilePath string + Name string + PostHook CommandHook + PreHook CommandHook + func (u FileUpdater) GetFile() (reader *os.File, err error) + func (u FileUpdater) GetFileContent() ([]byte, error) + func (u FileUpdater) GetFileContentAsString() (string, error) + func (u FileUpdater) UpdateFile(date io.Reader) error + type FilesAtime []fileAtime + func (f FilesAtime) Len() int + func (f FilesAtime) Less(i, j int) bool + func (f FilesAtime) Swap(i, j int) + type Hook interface + Do func() error + type ServerConfigs struct + FileUpdaters []FileUpdater + IncludeSelf bool + Processes []process.Process + ServerHost string + ServerPort string + func (s ServerConfigs) GetUpdaterByName(name string) *FileUpdater + func (s ServerConfigs) RunProcess() + type Updater interface + GetFileContent func() (io.Reader, error) v0.2.2-alpha May 28, 2022