removeScripts removes .. pairs from its input
(in []byte)
| 228 | |
| 229 | // removeScripts removes <script > .. </script> pairs from its input |
| 230 | func 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 |
| 243 | func addFlags(f *testFlags, flags []string) { |
no outgoing calls
no test coverage detected
searching dependent graphs…