mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
* address some staticcheck issues * address some staticcheck issues * address some staticcheck issues * address some staticcheck issues
27 lines
429 B
Go
27 lines
429 B
Go
// go mod init cliparse.go
|
|
// go get golang.org/x/sys
|
|
// go get github.com/kballard/go-shellquote
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"cliparse/arch"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println("-- os.Args:")
|
|
for i, arg := range os.Args {
|
|
fmt.Printf("args[%d] <<%s>>\n", i, arg)
|
|
}
|
|
fmt.Println()
|
|
|
|
fmt.Println("-- canonical args:")
|
|
args := arch.GetMainArgs()
|
|
|
|
for i, arg := range args {
|
|
fmt.Printf("args[%d] <<%s>>\n", i, arg)
|
|
}
|
|
}
|