parent
b34ba2149d
commit
0cde9623d3
2 changed files with 2 additions and 2 deletions
|
|
@ -215,7 +215,7 @@ func (s *Server) RemoveResources(uris ...string) {
|
|||
func() bool { return s.resources.remove(uris...) })
|
||||
}
|
||||
|
||||
// AddResourceTemplate adds a [ResourceTemplate] to the server, or replaces on with the same URI.
|
||||
// AddResourceTemplate adds a [ResourceTemplate] to the server, or replaces one with the same URI.
|
||||
// AddResourceTemplate panics if a URI template is invalid or not absolute (has an empty scheme).
|
||||
func (s *Server) AddResourceTemplate(t *ResourceTemplate, h ResourceHandler) {
|
||||
s.changeAndNotify(notificationResourceListChanged, &ResourceListChangedParams{},
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ func defaultSendingMethodHandler[S Session](ctx context.Context, session S, meth
|
|||
return res, nil
|
||||
}
|
||||
|
||||
// Helper methods to avoid typed nil.
|
||||
// Helper method to avoid typed nil.
|
||||
func orZero[T any, P *U, U any](p P) T {
|
||||
if p == nil {
|
||||
var zero T
|
||||
|
|
|
|||
Loading…
Reference in a new issue