MCPcopy Index your code
hub / github.com/coder/coder / normalizeGoldenWebhook

Function normalizeGoldenWebhook

coderd/notifications/notifications_test.go:1782–1789  ·  view source on GitHub ↗
(content []byte)

Source from the content-addressed store, hash-verified

1780}
1781
1782func normalizeGoldenWebhook(content []byte) []byte {
1783 const constantUUID = "00000000-0000-0000-0000-000000000000"
1784 uuidRegex := regexp.MustCompile(`[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`)
1785 content = uuidRegex.ReplaceAll(content, []byte(constantUUID))
1786 content = normalizeLineEndings(content)
1787
1788 return content
1789}
1790
1791func TestDisabledByDefaultBeforeEnqueue(t *testing.T) {
1792 t.Parallel()

Callers 1

Calls 2

MustCompileMethod · 0.80
normalizeLineEndingsFunction · 0.70

Tested by

no test coverage detected