dfbcce84ae
Now, you can add multiple logs within the configuration file, which is really cool, if you need multiple logs off of machines in one go round. Please note that you'll have to enter absolute paths for each log to get transferred.
32 lines
490 B
Go
32 lines
490 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path/filepath"
|
|
"time"
|
|
)
|
|
|
|
func timeToString(currentTime time.Time) string {
|
|
return currentTime.String()
|
|
}
|
|
|
|
func osfileToSting(currentOsFile *os.File) string {
|
|
file, err := os.Open(currentOsFile.Name())
|
|
|
|
fileinfo, err := file.Stat()
|
|
|
|
if err != nil {
|
|
fmt.Printf("Heyo, there's no file here!\n")
|
|
}
|
|
|
|
name := fileinfo.Name()
|
|
return name
|
|
}
|
|
|
|
func slashSeperator(unslashed string) string {
|
|
s := unslashed
|
|
_, file := filepath.Split(s)
|
|
return file
|
|
}
|