create type D map[string]interface{}
This commit is contained in:
parent
3c239f6114
commit
1fa09053ac
@ -27,5 +27,5 @@ func anotherHelloWorld(c *ron.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func helloWorldJSON(c *ron.Context) {
|
func helloWorldJSON(c *ron.Context) {
|
||||||
c.JSON(200, map[string]string{"message": "hello world"})
|
c.JSON(200, ron.D{"message": "hello world"})
|
||||||
}
|
}
|
||||||
|
|||||||
3
ron.go
3
ron.go
@ -3,9 +3,12 @@ package ron
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"log/slog"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type D map[string]interface{}
|
||||||
|
|
||||||
type Context struct {
|
type Context struct {
|
||||||
C context.Context
|
C context.Context
|
||||||
W http.ResponseWriter
|
W http.ResponseWriter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user