mirror of
https://github.com/alice-lg/birdwatcher.git
synced 2025-03-09 00:00:05 +01:00
fixed cast, removed debug output
This commit is contained in:
parent
d55f56ccd1
commit
0cba1865b0
3 changed files with 3 additions and 7 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.4.2
|
||||
1.4.3
|
||||
|
|
|
@ -54,7 +54,7 @@ func RunAndParse(cmd string, parser func([]byte) Parsed) (Parsed, bool) {
|
|||
|
||||
func Status() (Parsed, bool) {
|
||||
birdStatus, ok := RunAndParse("status", parseStatus)
|
||||
status := birdStatus["status"].(map[string]interface{})
|
||||
status := birdStatus["status"].(Parsed)
|
||||
|
||||
// Last Reconfig Timestamp source:
|
||||
var lastReconfig string
|
||||
|
|
|
@ -35,11 +35,7 @@ func lastReconfigTimestampFromFileContent(filename string, regex string) string
|
|||
|
||||
scanner := bufio.NewScanner(file)
|
||||
for scanner.Scan() {
|
||||
txt := scanner.Text()
|
||||
fmt.Println("---------")
|
||||
fmt.Println(txt)
|
||||
|
||||
matches := rx.FindStringSubmatch(txt)
|
||||
matches := rx.FindStringSubmatch(scanner.Text())
|
||||
if len(matches) > 0 {
|
||||
return matches[1]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue