swaggymnia: cannot run on mac

Expected behavior

Get the swagger json format

Current behavior

panic: assignment to entry in nil map

goroutine 1 [running]:
main.parse(0xc420010ae0, 0x6, 0x3, 0xed2057f5f, 0x1e848000, 0x0, 0xc42000ac20, 0x1c, 0xc4200ad900, 0x8, ...)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/swagger.go:51 +0x32c
main.(*Swagger).Generate(0xc42018b7d8, 0x7ffeefbff9f0, 0x16, 0x7ffeefbffa0f, 0xb, 0x7ffeefbffa1e, 0x4)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/swagger.go:83 +0x11f
main.main.func1(0xc420076840, 0x10100, 0xc420076840)
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/app.go:57 +0x180
github.com/urfave/cli.HandleAction(0x11bd260, 0x12080d8, 0xc420076840, 0xc420060300, 0x0)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/app.go:502 +0xd4
github.com/urfave/cli.Command.Run(0x11fab4d, 0x8, 0x0, 0x0, 0xc420010880, 0x1, 0x1, 0x1202246, 0x1e, 0x0, ...)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/command.go:210 +0xb87
github.com/urfave/cli.(*App).Run(0xc4200b81c0, 0xc42000e080, 0x8, 0x8, 0x0, 0x0)
	C:/Users/Mohamed/go/src/github.com/urfave/cli/app.go:259 +0x7b7
main.main()
	C:/Users/Mohamed/go/src/github.com/mlabouardy/swaggymnia/app.go:66 +0x515

Steps to reproduce the behavior

./swaggymnia generate -insomnia 2018-02-02.json -config config.json -o json

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 2
  • Comments: 19 (3 by maintainers)

Most upvoted comments

I got a similar error: screen shot 2018-03-20 at 5 14 50 pm

MacBook Pro (Retina, 15-inch, Mid 2014) macOS Sierra v10.12.6 (16G1114)

@faiverson you need to add the binary to the PATH variable or use the relative path to use the cli ./swaggymnia --help