Skip to content

Commit

Permalink
Replaced snake_case with camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
LumePart committed Sep 7, 2024
1 parent d85221e commit ef672dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)


var prom_reg *prometheus.Registry
var promReg *prometheus.Registry
var daemon bool

func downloadFile(url string, localFilePath string) {
Expand Down Expand Up @@ -84,11 +84,11 @@ func main() {
fmt.Println("running exporter as service")
}

prom_reg = prometheus.NewRegistry()
promReg = prometheus.NewRegistry()
stocks := regStocks()

prometheus.DefaultRegisterer = prom_reg
prometheus.DefaultGatherer = prom_reg
prometheus.DefaultRegisterer = promReg
prometheus.DefaultGatherer = promReg


collect := &CustomCollector{
Expand Down
2 changes: 1 addition & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func checkTime(c prometheus.Collector, loc *time.Location) {

// Compare current time with the target time
if currentTime.After(targetTime) || currentTime.Weekday() == time.Sunday || currentTime.Weekday() == time.Saturday { // If the current time in the baltics is later than market close time, exit the program
prom_reg.Unregister(c)
promReg.Unregister(c)
fmt.Println("Metrics unregistered.. Exiting..")
os.Exit(0)
}
Expand Down

0 comments on commit ef672dd

Please sign in to comment.