initial commit

This commit is contained in:
2025-09-24 00:01:06 +02:00
parent 3a93f48397
commit 26bca77a03
12 changed files with 759 additions and 0 deletions

34
cmd/root.go Normal file
View File

@@ -0,0 +1,34 @@
package cmd
import (
"fmt"
"io"
"log"
"os"
)
func Die(err error) int {
log.Fatal("Error: ", err.Error())
return 1
}
func Main(output io.Writer) int {
conf, err := InitConfig(output)
if err != nil {
return Die(err)
}
if conf.Examples {
fmt.Fprintln(output, Examples)
os.Exit(0)
}
tp := NewTP(conf)
if err := tp.ProcessTimestamps(); err != nil {
return Die(err)
}
return 0
}