MCPcopy Index your code
hub / github.com/bytebase/bytebase / IsDefaultProject

Function IsDefaultProject

backend/common/const.go:36–38  ·  view source on GitHub ↗

IsDefaultProject returns whether a project resource ID is the default project. Handles both new format ("default-{workspaceID}") and legacy format ("default").

(workspaceID, projectID string)

Source from the content-addressed store, hash-verified

34// IsDefaultProject returns whether a project resource ID is the default project.
35// Handles both new format ("default-{workspaceID}") and legacy format ("default").
36func IsDefaultProject(workspaceID, projectID string) bool {
37 return projectID == DefaultProjectID(workspaceID) || projectID == "default"
38}
39
40const (
41 // DefaultTestEnvironmentID is the initial resource ID for the test environment.

Callers 5

UpdateProjectMethod · 0.92
DeleteProjectMethod · 0.92
BatchDeleteProjectsMethod · 0.92
DeleteInstanceMethod · 0.92
getResourceFromRequestFunction · 0.92

Calls 1

DefaultProjectIDFunction · 0.85

Tested by

no test coverage detected