MCPcopy Create free account
hub / github.com/google/pprof / removeScripts

Function removeScripts

internal/driver/driver_test.go:230–240  ·  view source on GitHub ↗

removeScripts removes .. pairs from its input

(in []byte)

Source from the content-addressed store, hash-verified

228
229// removeScripts removes <script > .. </script> pairs from its input
230func removeScripts(in []byte) []byte {
231 beginMarker := []byte("<script")
232 endMarker := []byte("</script>")
233
234 if begin := bytes.Index(in, beginMarker); begin > 0 {
235 if end := bytes.Index(in[begin:], endMarker); end > 0 {
236 in = append(in[:begin], removeScripts(in[begin+end+len(endMarker):])...)
237 }
238 }
239 return in
240}
241
242// addFlags parses flag descriptions and adds them to the testFlags
243func addFlags(f *testFlags, flags []string) {

Callers 1

TestParseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…