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

Function SanitizeFileName

pkg/watch/temp_dir_fixture.go:37–39  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

35var sanitizeForFilenameRe = regexp.MustCompile("[^a-zA-Z0-9.]")
36
37func SanitizeFileName(name string) string {
38 return sanitizeForFilenameRe.ReplaceAllString(name, "_")
39}
40
41func NewTempDirFixture(t testing.TB) *TempDirFixture {
42 dir, err := NewDir(SanitizeFileName(t.Name()))

Callers 1

NewTempDirFixtureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected