From b2df47bdb4da3ca26f49be767e08f647a058a08c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Mon, 1 Jul 2024 12:17:13 +0200 Subject: [PATCH] Revert pointer molestation --- main.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index eadb33e..417b5c0 100644 --- a/main.go +++ b/main.go @@ -35,18 +35,18 @@ func main() { // source,target,force? log.SetFlags(log.Lmicroseconds) - recurse := *flag.String("r", "", "recurse into directories") - file := *flag.String("f", "", "file to read instructions from") + recurse := flag.String("r", "", "recurse into directories") + file := flag.String("f", "", "file to read instructions from") flag.Parse() - log.Printf("Recurse: %s", recurse) - log.Printf("File: %s", file) + log.Printf("Recurse: %s", *recurse) + log.Printf("File: %s", *file) var instructions []LinkInstruction - if recurse != "" { - instructions, _ = ReadFromFilesRecursively(recurse) - } else if file != "" { - instructions, _ = ReadFromFile(file) + if *recurse != "" { + instructions, _ = ReadFromFilesRecursively(*recurse) + } else if *file != "" { + instructions, _ = ReadFromFile(*file) } else if len(os.Args) > 1 { instructions, _ = ReadFromArgs() } else {