lordwelch f56ee42b79 Change signatures to constant strings
Fix issues from golangci-lint

Add sublime project file
2021-01-11 01:24:36 -08:00

36 lines
755 B
Go

package main
import (
"flag"
"fmt"
"github.com/pierrec/cmdflag"
)
const lz4Extension = ".lz4"
func main() {
flag.CommandLine.Bool(cmdflag.VersionBoolFlag, false, "print the program version")
cli := cmdflag.New(nil)
cli.MustAdd(cmdflag.Application{
Name: "compress",
Args: "[arguments] [<file name> ...]",
Descr: "Compress the given files or from stdin to stdout.",
Err: flag.ExitOnError,
Init: Compress,
})
cli.MustAdd(cmdflag.Application{
Name: "uncompress",
Args: "[arguments] [<file name> ...]",
Descr: "Uncompress the given files or from stdin to stdout.",
Err: flag.ExitOnError,
Init: Uncompress,
})
if err := cli.Parse(); err != nil {
fmt.Println(err)
return
}
}