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 panic when passing in nested objects to dynamic commands #1535

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

crufter
Copy link
Contributor

@crufter crufter commented Oct 26, 2020

Fixing

        	panic: interface conversion: interface {} is map[string]string, not map[string]interface {}
        
        goroutine 1 [running]:
        github.com/micro/micro/v3/cmd.(*command).Run.func1()
        	/home/crufter/code/src/github.com/micro/micro/cmd/cmd.go:574 +0x136
        panic(0x10b5240, 0xc0005b8db0)
        	/usr/local/go/src/runtime/panic.go:967 +0x15d
        github.com/micro/micro/v3/cmd.flagsToRequest(0xc0005b8d20, 0xc0002c8dc0, 0xc, 0xc00019ac01, 0xc)
        	/home/crufter/code/src/github.com/micro/micro/cmd/dynamic.go:397 +0x824
        github.com/micro/micro/v3/cmd.callService(0xc000593aa0, 0x12a0982, 0x5, 0xc00058e8c0, 0x0, 0x0)
        	/home/crufter/code/src/github.com/micro/micro/cmd/dynamic.go:171 +0x1f6

When passing in multi level object to dynamic commands ie micro users --user_email=email save

@crufter crufter merged commit 4c5dccd into master Oct 26, 2020
@crufter crufter deleted the fixdyn branch October 26, 2020 10:29
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.

2 participants