MCPcopy
hub / github.com/docker/compose / DockerIgnoreTesterFromContents

Function DockerIgnoreTesterFromContents

pkg/watch/dockerignore.go:164–171  ·  view source on GitHub ↗
(repoRoot string, contents string)

Source from the content-addressed store, hash-verified

162}
163
164func DockerIgnoreTesterFromContents(repoRoot string, contents string) (*dockerPathMatcher, error) {
165 patterns, err := ignorefile.ReadAll(strings.NewReader(contents))
166 if err != nil {
167 return nil, fmt.Errorf("error reading .dockerignore: %w", err)
168 }
169
170 return NewDockerPatternMatcher(repoRoot, patterns)
171}

Callers

nothing calls this directly

Calls 1

NewDockerPatternMatcherFunction · 0.85

Tested by

no test coverage detected