MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / splitHubPath

Function splitHubPath

cli/cmd/validate_config.go:237–243  ·  view source on GitHub ↗

splitHubPath parses a CloudQuery-registry path field ("team/name") into its parts.

(p string)

Source from the content-addressed store, hash-verified

235
236// splitHubPath parses a CloudQuery-registry path field ("team/name") into its parts.
237func splitHubPath(p string) (team, name string, err error) {
238 parts := strings.SplitN(p, "/", 2)
239 if len(parts) != 2 || parts[0] == "" || parts[1] == "" {
240 return "", "", fmt.Errorf("invalid cloudquery-registry path %q (expected team/name)", p)
241 }
242 return parts[0], parts[1], nil
243}

Callers 2

TestSplitHubPathFunction · 0.85
validateViaHubAPIFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by 1

TestSplitHubPathFunction · 0.68