(appId string)
| 45 | } |
| 46 | |
| 47 | func 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 | |
| 60 | func ValidateAppId(appId string) error { |
| 61 | appNS, appName, err := ParseAppId(appId) |
no outgoing calls
no test coverage detected