Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PrettyJson colorize function #453

Merged
merged 1 commit into from
Sep 12, 2018
Merged

Fix PrettyJson colorize function #453

merged 1 commit into from
Sep 12, 2018

Conversation

NicolasMahe
Copy link
Member

@NicolasMahe NicolasMahe commented Sep 12, 2018

The PrettyJSON function was panicking because of a non initialized map.

panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/mesg-foundation/core/utils/pretty.(*Pretty).ColorizeJSON(0xc0000ae680, 0xc0000be220, 0xc0000be200, 0xc0003c4500, 0x125, 0x140, 0x140, 0x125, 0xc0003c4500)
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/utils/pretty/pretty.go:228 +0x2e4
github.com/mesg-foundation/core/utils/pretty.ColorizeJSON(0xc0000be220, 0xc0000be200, 0xc0003c4500, 0x125, 0x140, 0x140, 0x0, 0xc00077d280)
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/utils/pretty/pretty.go:360 +0x63
github.com/mesg-foundation/core/commands.(*serviceDevCmd).runE(0xc0003f36e0, 0xc0000c9b00, 0xc00016eef0, 0x1, 0x1, 0x0, 0x0)
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/commands/service_dev.go:98 +0xc85
github.com/mesg-foundation/core/commands.(*serviceDevCmd).runE-fm(0xc0000c9b00, 0xc00016eef0, 0x1, 0x1, 0x0, 0x0)
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/commands/service_dev.go:37 +0x52
github.com/mesg-foundation/core/vendor/github.com/spf13/cobra.(*Command).execute(0xc0000c9b00, 0xc00016eec0, 0x1, 0x1, 0xc0000c9b00, 0xc00016eec0)
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/vendor/github.com/spf13/cobra/command.go:746 +0x473
github.com/mesg-foundation/core/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc00043efc0, 0x3, 0xc0001aaae0, 0xf)
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/vendor/github.com/spf13/cobra/command.go:831 +0x2dc
github.com/mesg-foundation/core/vendor/github.com/spf13/cobra.(*Command).Execute(0xc00043efc0, 0x18d6271, 0x9)
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/vendor/github.com/spf13/cobra/command.go:784 +0x2b
main.main()
        /Users/nico/Developments/Go/src/github.com/mesg-foundation/core/interface/cli/main.go:35 +0x25b
exit status 2

@antho1404 antho1404 merged commit 00c3c1a into dev Sep 12, 2018
@antho1404 antho1404 deleted the fix/pretty-json branch September 12, 2018 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants