// This work is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// license. Its contents can be found at:
// http://creativecommons.org/publicdomain/zero/1.0/
package main
import (
"flag"
"fmt"
"os"
"path/filepath"
"strings"
)
// Config defines command line options.
type Config struct {
Input string // Input directory with assets.
Output string // Output directory for generated code.
Tags []string // Build tags to include in output files.
}
// NewConfig create s anew, filled configuration instance
// by reading and parsing command line options.
//
// This function exits the program with an error, if
// any of the command line options are incorrect.
func NewConfig() *Config {
var version bool
var tagstr string
c := new(Config)
flag.Usage = func() {
fmt.Printf("Usage: %s [options] [