Refactor reading args

This commit is contained in:
2024-07-03 13:31:12 +02:00
parent 7580ca5399
commit 2a7740d8d7

View File

@@ -197,7 +197,7 @@ func ReadFromArgs(output chan LinkInstruction, status chan error) {
defer close(status)
log.Printf("Reading input from args")
for _, arg := range os.Args[1:] {
for _, arg := range flag.Args() {
instruction, err := ParseInstruction(arg)
if err != nil {
log.Printf("Error parsing arg: %s'%s'%s, error: %s%+v%s", SourceColor, arg, DefaultColor, ErrorColor, err, DefaultColor)