mcp: rename mcp{Params,Result} to is{Params,Result} (#270)
For some reason, when making these marker methods, the standard naming convention escaped me.
This commit is contained in:
parent
388e000aa2
commit
4e413da771
1 changed files with 40 additions and 40 deletions
|
|
@ -337,8 +337,8 @@ func setProgressToken(p Params, pt any) {
|
|||
|
||||
// Params is a parameter (input) type for an MCP call or notification.
|
||||
type Params interface {
|
||||
// mcpParams discourages implementation of Params outside of this package.
|
||||
mcpParams()
|
||||
// isParams discourages implementation of Params outside of this package.
|
||||
isParams()
|
||||
|
||||
// GetMeta returns metadata from a value.
|
||||
GetMeta() map[string]any
|
||||
|
|
@ -361,8 +361,8 @@ type RequestParams interface {
|
|||
|
||||
// Result is a result of an MCP call.
|
||||
type Result interface {
|
||||
// mcpResult discourages implementation of Result outside of this package.
|
||||
mcpResult()
|
||||
// isResult discourages implementation of Result outside of this package.
|
||||
isResult()
|
||||
|
||||
// GetMeta returns metadata from a value.
|
||||
GetMeta() map[string]any
|
||||
|
|
@ -374,7 +374,7 @@ type Result interface {
|
|||
// Those methods cannot return nil, because jsonrpc2 cannot handle nils.
|
||||
type emptyResult struct{}
|
||||
|
||||
func (*emptyResult) mcpResult() {}
|
||||
func (*emptyResult) isResult() {}
|
||||
func (*emptyResult) GetMeta() map[string]any { panic("should never be called") }
|
||||
func (*emptyResult) SetMeta(map[string]any) { panic("should never be called") }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue