Skip to content

Commit 6c6a626

Browse files
committed
refactor: clean up
1 parent 92c8632 commit 6c6a626

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

backend/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func main() {
5050
// kill -2 is syscall.SIGINT
5151
// kill -9 is syscall.SIGKILL but can't be catch, so don't need add it
5252
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
53-
go controller.Start(getPublicFolder(embeddedFiles))
53+
go controller.Start(getPublicFolder())
5454

5555
<-quit
5656
log.Println("Shutting down server...")
@@ -61,7 +61,7 @@ func main() {
6161
log.Println("Server exiting")
6262
}
6363

64-
func getPublicFolder(myEmbeddedFiles embed.FS) fs.FS {
64+
func getPublicFolder() fs.FS {
6565
result, err := fs.Sub(embeddedFiles, "public")
6666
if err != nil {
6767
log.Fatalf("%v\n", err)

backend/pkd/gasstation/gsrepo.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func ReCalcCountyStatePrices() {
224224
}
225225
return nil
226226
})
227-
myDuration := time.Now().Sub(myStart)
227+
myDuration := time.Since(myStart)
228228
log.Printf("recalcCountyStatePrices finished for %v states and %v counties in %v.", len(idStateDataMap), len(idCountyDataMap), myDuration)
229229
}
230230

@@ -366,7 +366,7 @@ func CalcCountyTimeSlots() {
366366
})
367367
}
368368
//store changes in countytimeslots
369-
myDuration := time.Now().Sub(myStart)
369+
myDuration := time.Since(myStart)
370370
log.Printf("calcCountyTimeSlots finished for %v counties in %v.", len(idCountyDataMap), myDuration)
371371
}
372372

0 commit comments

Comments
 (0)