Refactor reading args
This commit is contained in:
2
main.go
2
main.go
@@ -197,7 +197,7 @@ func ReadFromArgs(output chan LinkInstruction, status chan error) {
|
|||||||
defer close(status)
|
defer close(status)
|
||||||
|
|
||||||
log.Printf("Reading input from args")
|
log.Printf("Reading input from args")
|
||||||
for _, arg := range os.Args[1:] {
|
for _, arg := range flag.Args() {
|
||||||
instruction, err := ParseInstruction(arg)
|
instruction, err := ParseInstruction(arg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Error parsing arg: %s'%s'%s, error: %s%+v%s", SourceColor, arg, DefaultColor, ErrorColor, err, DefaultColor)
|
log.Printf("Error parsing arg: %s'%s'%s, error: %s%+v%s", SourceColor, arg, DefaultColor, ErrorColor, err, DefaultColor)
|
||||||
|
Reference in New Issue
Block a user