```go
package main
import (
"flag"
"fmt"
)
var infile *string = flag.String("i", "infile", "File contains values for sorting")
var outfile *string = flag.String("o", "outfile", "File to receive sorted values")
var algorithm *string = flag.String("a", "qsort", "Sort algorithm")
func main() {
flag.Parse()
if infile != nil {
fmt.Println("infile = ", *infile, "outfile =", *outfile, "algorithm =", *algorithm)
}
}
```
[ `go run` | done: ]
Failed to construct ipc body: Encode Error: 'utf8' codec can't decode bytes in position 14-15: invalid data
我刚开始学,还不懂
有疑问加站长微信联系(非本文作者)