MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / ParseAppId

Function ParseAppId

pkg/waveappstore/waveappstore.go:47–58  ·  view source on GitHub ↗
(appId string)

Source from the content-addressed store, hash-verified

45}
46
47func ParseAppId(appId string) (appNS string, appName string, err error) {
48 parts := strings.Split(appId, "/")
49 if len(parts) != 2 {
50 return "", "", fmt.Errorf("invalid appId format: must be namespace/name")
51 }
52 appNS = parts[0]
53 appName = parts[1]
54 if appNS == "" || appName == "" {
55 return "", "", fmt.Errorf("invalid appId: namespace and name cannot be empty")
56 }
57 return appNS, appName, nil
58}
59
60func ValidateAppId(appId string) error {
61 appNS, appName, err := ParseAppId(appId)

Callers 8

buildAndRunMethod · 0.92
ValidateAppIdFunction · 0.85
GetAppDirFunction · 0.85
PublishDraftFunction · 0.85
RevertDraftFunction · 0.85
MakeDraftFromLocalFunction · 0.85
GetAppModTimeFunction · 0.85
DraftHasLocalVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected