sort-cli: magic constants
This commit is contained in:
@ -2,6 +2,8 @@ package main
|
||||
|
||||
import "flag"
|
||||
|
||||
const stdin = "-"
|
||||
|
||||
type Config struct {
|
||||
Key int
|
||||
Numeric bool
|
||||
@ -21,6 +23,6 @@ func (c *Config) ParseFlags() {
|
||||
c.Sources = flag.Args()
|
||||
|
||||
if len(c.Sources) == 0 {
|
||||
c.Sources = []string{"-"}
|
||||
c.Sources = []string{stdin}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user