adding multiple logs is now live
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.
This commit is contained in:
26
string.go
26
string.go
@ -1,7 +1,31 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user