Skip to content

TestStateFromParam type problem #42

@jwfergus

Description

@jwfergus

I'm relatively new to golang, so I might be out of my depth here - sorry if so.

As soon as I forked this repo and ran go test I receive the following error:

        Error Trace:    shortcuts_test.go:30
	Error:      	Not equal: 
	            	expected: int(30)
	            	received: float64(30)

I fixed it for my purposes by adding a float64 convert to shortcuts_test.go line 29:
assert.Equal(t, float64(30), s.Get("age").Data())

What am I missing? I have to assume this worked out of the box on your machine. I tried using go build -a to force rebuilding of all packages (though I don't see how this would really solve the problem, I just saw this suggestion when searching the web for solutions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions