Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
572 Bytes
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/target/goalert/expflag"
)
func main() {
out := flag.String("out", "", "output file")
flag.Parse()
if *out == "" {
panic("missing -out")
}
fd, err := os.Create(*out)
if err != nil {
panic(err)
}
defer fd.Close()
var names []string
for _, f := range expflag.AllFlags() {
names = append(names, fmt.Sprintf("'%s'", f))
}
_, err = fmt.Fprintf(fd, `// Code generated by expflag/cmd/tsgen DO NOT EDIT.
type ExpFlag = %s
`, strings.Join(names, " | "))
if err != nil {
panic(err)
}
}