Files
go-worm/lib/instance/args.go
T
kato a3c78820ed refactor(capture): screen capture in subprocess
- Move screen capture to child process
- Isolate GDI/BitBlt crashes from agent
- Use -capture flag for internal helper mode
- Add protocol for frame request/response
- Make monitor enumeration thread-safe
2026-09-01 23:25:38 +03:00

24 lines
597 B
Go

package instance
import "strings"
func filterArgs(args []string) []string {
out := make([]string, 0, len(args))
for _, arg := range args {
name := strings.TrimLeft(arg, "-/")
lower := strings.ToLower(name)
switch {
case lower == "background" || strings.HasPrefix(lower, "background="):
continue
case lower == "foreground" || strings.HasPrefix(lower, "foreground="):
continue
case lower == "ensure" || strings.HasPrefix(lower, "ensure="):
continue
case lower == "capture" || strings.HasPrefix(lower, "capture="):
continue
}
out = append(out, arg)
}
return out
}