fix: Use name without json
This commit is contained in:
parent
231ebefe91
commit
c4d46b935f
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/bep/debounce"
|
"github.com/bep/debounce"
|
||||||
|
@ -51,7 +52,7 @@ func (s *WellKnownService) GetData(ctx context.Context) (*wkRegistry, error) {
|
||||||
if err := json.Unmarshal([]byte(data), &d); err != nil {
|
if err := json.Unmarshal([]byte(data), &d); err != nil {
|
||||||
klog.Error(err)
|
klog.Error(err)
|
||||||
}
|
}
|
||||||
reg[name] = d
|
reg[strings.TrimSuffix(name, ".json")] = d
|
||||||
}
|
}
|
||||||
|
|
||||||
return ®, nil
|
return ®, nil
|
||||||
|
|
Loading…
Reference in a new issue