Closed mumia closed 7 years ago
Sorry for the long silence. I know I don't have CI or unit tests for every feature, but can you add a test that covers this feature and show that it and the other tests still pass?
@karlkfi We are already using this in a production environment. :) I will write some tests so you can merge it. Thanks for the reply.
The tests are passing: $ go test -v ./... ? github.com/mumia/inject [no test files] === RUN TestExtractByType --- PASS: TestExtractByType (0.00s) === RUN TestExtractByTypeNoMatch --- PASS: TestExtractByTypeNoMatch (0.00s) === RUN TestExtractByTypeMultiMatch --- PASS: TestExtractByTypeMultiMatch (0.00s) === RUN TestExtractAssignable --- PASS: TestExtractAssignable (0.00s) === RUN TestExtractAssignableNoMatch --- PASS: TestExtractAssignableNoMatch (0.00s) === RUN TestExtractAssignableMultiMatch --- PASS: TestExtractAssignableMultiMatch (0.00s) === RUN TestFindByType --- PASS: TestFindByType (0.00s) === RUN TestFindAssignable --- PASS: TestFindAssignable (0.00s) === RUN TestGraphSupportsInterfaces --- PASS: TestGraphSupportsInterfaces (0.00s) === RUN TestGraphSupportsStructPointers --- PASS: TestGraphSupportsStructPointers (0.00s) === RUN TestGraphSupportsProviderConstructorArgs --- PASS: TestGraphSupportsProviderConstructorArgs (0.00s) === RUN TestGraphSupportsAutoProvider --- PASS: TestGraphSupportsAutoProvider (0.00s) === RUN TestGraphSupportsDownCasting --- PASS: TestGraphSupportsDownCasting (0.00s) === RUN TestGraphSupportsPartialResolution --- PASS: TestGraphSupportsPartialResolution (0.00s) === RUN TestGraphLifecycle --- PASS: TestGraphLifecycle (0.00s) === RUN TestVariadicNone --- PASS: TestVariadicNone (0.00s) === RUN TestVariadicOne --- PASS: TestVariadicOne (0.00s) === RUN TestVariadicAll --- PASS: TestVariadicAll (0.00s) PASS ok github.com/mumia/inject/test 0.009s ? github.com/mumia/inject/test/variadic [no test files]
:)
Tests are failing because one of your imports is importing your fork, not the real path
Thanks!
This change has broken for slice arguments.
if inType.Kind() == reflect.Slice {
inType = inType.Elem()
}
If arg type is []uint
, inType
will be uint
and fail AssignableTo
and ConvertibleTo
.
Issue created #8
Example:
Where routes.NewRouteRegistry is: