MCPcopy Index your code
hub / github.com/coder/coder / indexOf

Function indexOf

cli/exp_mcp.go:977–984  ·  view source on GitHub ↗

indexOf returns the index of the first instance of substr in s, or -1 if substr is not present in s.

(s, substr string)

Source from the content-addressed store, hash-verified

975// indexOf returns the index of the first instance of substr in s,
976// or -1 if substr is not present in s.
977func indexOf(s, substr string) int {
978 for i := 0; i <= len(s)-len(substr); i++ {
979 if s[i:i+len(substr)] == substr {
980 return i
981 }
982 }
983 return -1
984}
985
986// mcpFromSDK adapts a toolsdk.Tool to go-mcp's server.ServerTool.
987// It assumes that the tool responds with a valid JSON object.

Callers 1

injectClaudeMDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected