This commit is contained in:
Judah Caruso 2026-01-25 22:44:56 -07:00
parent a3c6e4aeb5
commit bbcf5aaa73

13
main.go
View file

@ -13,12 +13,23 @@ func main() {
exe, args := os.Args[0], os.Args[1:]
exe = filepath.Base(exe)
if len(args) < 1 {
usage := func() {
fmt.Fprintf(os.Stderr, "usage: %s [file.riv] [file.html]\n", exe)
}
if len(args) < 1 {
usage()
return
}
inpath := args[0]
for _, arg := range args {
if arg == "-h" || arg == "--help" {
usage()
return
}
}
file, err := os.ReadFile(inpath)
if err != nil {
fmt.Fprintf(os.Stderr, "error reading file: %v\n", err)