No Need to printf when you dont format the string
This commit is contained in:
@@ -17,7 +17,7 @@ func GetActiveChannels(fileList []string) []string {
|
||||
t := time.Now()
|
||||
|
||||
layout := "20060102"
|
||||
todayString := fmt.Sprintf(t.Format(layout))
|
||||
todayString := fmt.Sprint(t.Format(layout))
|
||||
|
||||
for _, file := range fileList {
|
||||
if !strings.Contains(file, "Corp") {
|
||||
@@ -49,8 +49,8 @@ func IsCurrentLog(file string) bool {
|
||||
timeToday := time.Now()
|
||||
timeYesterday := time.Now().Add(-24 * time.Hour)
|
||||
layout := "20060102"
|
||||
todayString := fmt.Sprintf(timeToday.Format(layout))
|
||||
yesterdayString := fmt.Sprintf(timeYesterday.Format(layout))
|
||||
todayString := fmt.Sprint(timeToday.Format(layout))
|
||||
yesterdayString := fmt.Sprint(timeYesterday.Format(layout))
|
||||
fileNameSplit := strings.Split(file, "/")
|
||||
fileName := fileNameSplit[len(fileNameSplit)-1] // returns file name without any "/" prefixes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user