make endpoints pointers to enable/disable them
This commit is contained in:
parent
f6cb47fbbb
commit
af22c1a4d8
12 changed files with 229 additions and 93 deletions
|
@ -25,15 +25,14 @@ import (
|
|||
func TestRegisterServer(t *testing.T) {
|
||||
server := UnimplementedServer{}
|
||||
endpoints := Endpoints{
|
||||
Authorization: Endpoint{
|
||||
Authorization: &Endpoint{
|
||||
path: "/auth",
|
||||
},
|
||||
}
|
||||
decoder := schema.NewDecoder()
|
||||
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
|
||||
|
||||
h := RegisterServer(server,
|
||||
WithEndpoints(endpoints),
|
||||
h := RegisterServer(server, endpoints,
|
||||
WithDecoder(decoder),
|
||||
WithFallbackLogger(logger),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue