Parser (#9)
Reviewed-on: #9 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -2,8 +2,9 @@ package main
|
||||
|
||||
import "fmt"
|
||||
import "os"
|
||||
import "git.kundeng.us/phoenix/clean_file/parser"
|
||||
|
||||
const VERSION = "0.4.101"
|
||||
const VERSION = "0.3.101"
|
||||
|
||||
func main() {
|
||||
fmt.Println("clean_file")
|
||||
@@ -17,6 +18,13 @@ func main() {
|
||||
filepath := args[1]
|
||||
|
||||
fmt.Println("File path:", filepath)
|
||||
// TODO: Create parser package and Parser struct to do the remaining
|
||||
// work
|
||||
prsr := parser.NumberParser{FilePath: filepath}
|
||||
|
||||
rawValues := prsr.FileDump()
|
||||
parsedValues := prsr.UpdateValues(rawValues)
|
||||
newUpdated := prsr.RemoveDups(parsedValues)
|
||||
|
||||
prsr.PrintValues(newUpdated, true)
|
||||
|
||||
prsr.SaveFile(newUpdated)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user