Further work; tidying up, begin cmdline tool

This commit is contained in:
Laurence Withers 2019-03-13 21:55:31 +00:00
commit 5c05a75fba
5 changed files with 180 additions and 55 deletions

28
cmd/htpacker/main.go Normal file
View file

@ -0,0 +1,28 @@
package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "htpacker",
Short: "htpacker packs static files into a blob that can be served efficiently over HTTP",
Long: `Creates .htpack files comprising one or more static assets, and
compressed versions thereof. A YAML specification of files to pack may be
provided or generated on demand; or files and directories can be listed as
arguments.`,
}
func main() {
rootCmd.AddCommand(packCmd)
//rootCmd.AddCommand(yamlCmd)
rootCmd.AddCommand(inspectCmd)
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}