mast/parser/main.go
aynish b0ec8fefa3 init: working task add parser for go (#5)
Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
Reviewed-on: #5
2024-08-31 23:00:05 -07:00

23 lines
343 B
Go

package parser
import (
"fmt"
"os"
)
func main() {
if len(os.Args) < 2 {
fmt.Println("Please provide a Taskwarrior add command to parse")
return
}
input := os.Args[1]
result, err := Parse("", []byte(input))
if err != nil {
fmt.Printf("Error parsing input: %v\n", err)
return
}
fmt.Printf("Parsed result: %+v\n", result)
}