MCPcopy Index your code
hub / github.com/github/github-mcp-server / MustGetUIAsset

Function MustGetUIAsset

pkg/github/ui_embed.go:26–32  ·  view source on GitHub ↗

MustGetUIAsset reads a UI asset and panics if it fails. Use this when the asset is required for server operation.

(name string)

Source from the content-addressed store, hash-verified

24// MustGetUIAsset reads a UI asset and panics if it fails.
25// Use this when the asset is required for server operation.
26func MustGetUIAsset(name string) string {
27 html, err := GetUIAsset(name)
28 if err != nil {
29 panic("failed to load UI asset " + name + ": " + err.Error())
30 }
31 return html
32}
33
34// UIAssetsAvailable returns true if the MCP App UI assets have been built.
35// This checks for a known UI asset file to determine if `script/build-ui` has been run.

Callers 1

RegisterUIResourcesFunction · 0.85

Calls 2

GetUIAssetFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected