Skip to content

Commit 7e57077

Browse files
authored
Merge pull request #48 from shamer/custom-import-on-params
process customImports on Params with other flags
2 parents 1c95abb + 42d7be4 commit 7e57077

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tscriptify/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ type Params struct {
6262
func main() {
6363
var p Params
6464
var backupDir string
65-
var customImports arrayImports
6665
flag.StringVar(&p.ModelsPackage, "package", "", "Path of the package with models")
6766
flag.StringVar(&p.TargetFile, "target", "", "Target typescript file")
6867
flag.StringVar(&backupDir, "backup", "", "Directory where backup files are saved")
6968
flag.BoolVar(&p.Interface, "interface", false, "Create interfaces (not classes)")
70-
flag.Var(&customImports, "import", "Typescript import for your custom type, repeat this option for each import needed")
69+
flag.Var(&p.CustomImports, "import", "Typescript import for your custom type, repeat this option for each import needed")
7170
flag.Parse()
7271

7372
structs := []string{}

0 commit comments

Comments
 (0)