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

Function stripContainerFromPath

backend/api/v1/document_masking.go:323–328  ·  view source on GitHub ↗

stripContainerFromPath returns a PathAST with the first node (container) removed.

(path *parserbase.PathAST)

Source from the content-addressed store, hash-verified

321
322// stripContainerFromPath returns a PathAST with the first node (container) removed.
323func stripContainerFromPath(path *parserbase.PathAST) *parserbase.PathAST {
324 if path != nil && path.Root != nil {
325 return parserbase.NewPathAST(path.Root.GetNext())
326 }
327 return parserbase.NewPathAST(nil)
328}
329
330// maskBySourcePaths checks if any source field path resolves to a sensitive semantic type.
331// Returns (maskedValue, true, nil) if masked, or (nil, false, nil) if no path is sensitive.

Callers 3

maskFieldBySourcePathsFunction · 0.85
maskBySourcePathsFunction · 0.85
findMaskerForScalarValueFunction · 0.85

Calls 1

GetNextMethod · 0.65

Tested by

no test coverage detected