1
0
Fork 0
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:
Matthias Hannig 2016-12-05 14:54:13 +01:00
parent d55f56ccd1
commit 0cba1865b0
3 changed files with 3 additions and 7 deletions

View file

@ -1 +1 @@
1.4.2
1.4.3

View file

@ -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

View file

@ -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]
}