feature: dynamic scope using input arguments #23
12
handler.go
12
handler.go
|
@ -59,13 +59,11 @@ func (s Handler) resolve(w http.ResponseWriter, r *http.Request) {
|
||||||
for b, perm := range list {
|
for b, perm := range list {
|
||||||
scope[a][b] = perm
|
scope[a][b] = perm
|
||||||
for name, value := range input.Data {
|
for name, value := range input.Data {
|
||||||
if stringer, ok := value.(fmt.Stringer); ok {
|
scope[a][b] = strings.ReplaceAll(
|
||||||
scope[a][b] = strings.ReplaceAll(
|
scope[a][b],
|
||||||
scope[a][b],
|
fmt.Sprintf("[%s]", name),
|
||||||
fmt.Sprintf("[%s]", name),
|
fmt.Sprintf("[%v]", value),
|
||||||
fmt.Sprintf("[%s]", stringer),
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue