Add this to allocate once, instead of multiple times with `append`:

```go
exts = make([]string, 0, len(inputExts))
```