Debian Codegraph @

exp/open/open_windows.go

raw
1 //go:build windows
2 // +build windows
3
4 package open
5
6 import (
7 "context"
8 "os/exec"
9 )
10
11 func buildCmd(ctx context.Context, app, path string) *exec.Cmd {
12 if app != "" {
13 return exec.Command("cmd", "/C", "start", "", app, path)
14 }
15 return exec.CommandContext(ctx, "rundll32", "url.dll,FileProtocolHandler", path)
16 }