MCPcopy Create free account
hub / github.com/github/gh-aw / getDotFolderExcludes

Function getDotFolderExcludes

pkg/workflow/runtime_definitions.go:270–280  ·  view source on GitHub ↗

getDotFolderExcludes returns the subset of excludeFiles that are top-level dot-folder path prefixes (i.e. start with "." and end with "/"). These are used at compile time to tell the runtime handler which specific dot-folders have been opted out of the general top-level-dot-folder protection.

(excludeFiles []string)

Source from the content-addressed store, hash-verified

268// These are used at compile time to tell the runtime handler which specific
269// dot-folders have been opted out of the general top-level-dot-folder protection.
270func getDotFolderExcludes(excludeFiles []string) []string {
271 var result []string
272 for _, f := range excludeFiles {
273 // Must start with ".", end with "/", and have at least one char between
274 // them (e.g. ".agents/" is valid; "./" is not).
275 if len(f) > 2 && f[0] == '.' && f[len(f)-1] == '/' {
276 result = append(result, f)
277 }
278 }
279 return result
280}
281
282// findRuntimeByID finds a runtime configuration by its ID
283func findRuntimeByID(id string) *Runtime {

Callers 3

TestGetDotFolderExcludesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestGetDotFolderExcludesFunction · 0.68