MustGetUIAsset reads a UI asset and panics if it fails. Use this when the asset is required for server operation.
(name string)
| 24 | // MustGetUIAsset reads a UI asset and panics if it fails. |
| 25 | // Use this when the asset is required for server operation. |
| 26 | func 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. |
no test coverage detected