From 6f9029d4e366cc1121087fbc4f3df57d247d0a3d Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 28 Jul 2025 21:28:37 +0000 Subject: [PATCH] main code (#8) Reviewed-on: https://git.kundeng.us/phoenix/clean_file/pulls/8 Co-authored-by: phoenix Co-committed-by: phoenix --- main.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index d99725f..1875a2e 100644 --- a/main.go +++ b/main.go @@ -1,9 +1,22 @@ package main import "fmt" +import "os" -const VERSION = "0.4.100" +const VERSION = "0.4.101" func main() { fmt.Println("clean_file") + args := os.Args + + if len(args) < 2 { + fmt.Println("Invalid arguments provided") + os.Exit(-1) + } + + filepath := args[1] + + fmt.Println("File path:", filepath) + // TODO: Create parser package and Parser struct to do the remaining + // work }