mirror of
https://github.com/alice-lg/birdwatcher.git
synced 2025-03-09 00:00:05 +01:00
Call pattern() with the name of the start tag instead.
This commit is contained in:
parent
87f8123138
commit
2335670d97
1 changed files with 7 additions and 2 deletions
|
@ -2,8 +2,10 @@ package main
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
func Protocols(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
|
@ -13,10 +15,13 @@ func Protocols(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
|||
|
||||
lines, err := readLines(conf.Conf.FileName)
|
||||
if err != nil {
|
||||
slog.Err("Couldn't find file: " + conf.Conf.FileName)
|
||||
return
|
||||
}
|
||||
|
||||
pattern(conf.Res["getprotocol"], lines)
|
||||
res["data"] = pattern("getprotocol", lines)
|
||||
|
||||
fmt.Printf(">>>>>>>>>>>>>>>> data: %v\n", res["data"])
|
||||
|
||||
js, _ := json.Marshal(res)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue