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 invalid type assertion #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atotto
Copy link

@atotto atotto commented Mar 29, 2017

Hi akio-san,

I find panic on the SearchParam type assertion.

package example_test

import (
	"testing"

	"ros"
)

func TestSearchParam(t *testing.T) {
	node := ros.NewNode("/example_node")

	_, err := node.SearchParam("not_found")
	if err == nil {
		t.Errorf("want err, got nil")
	}
}

got panic:

go test
--- FAIL: TestSearchParam (0.00s)
panic: interface conversion: interface {} is nil, not string [recovered]
	panic: interface conversion: interface {} is nil, not string

t-asaka added a commit to t-asaka/rosgo that referenced this pull request Sep 24, 2020
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.

1 participant