mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
26 lines
440 B
Go
26 lines
440 B
Go
// +build windows
|
|
|
|
package arch
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
shellquote "github.com/kballard/go-shellquote"
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
func GetMainArgs() []string {
|
|
commandLine := windows.UTF16PtrToString(windows.GetCommandLine())
|
|
|
|
split, err := shellquote.Split(commandLine)
|
|
if err != nil {
|
|
fmt.Fprintf(
|
|
os.Stderr,
|
|
"%s: could not parse obtain Windows command line: %v\n",
|
|
os.Args[0], err,
|
|
)
|
|
os.Exit(1)
|
|
}
|
|
return split
|
|
}
|