Import of testify packages (assert, require, suite, mock, http) as _ is useless: those package don't do init magic.
They might have been imported like that in the past to workaround issues in dependency management tools (see the related case #37) but, now, in the Go modules era, this is obsolete.
Import of testify packages (
assert
,require
,suite
,mock
,http
) as_
is useless: those package don't doinit
magic.They might have been imported like that in the past to workaround issues in dependency management tools (see the related case #37) but, now, in the Go modules era, this is obsolete.
Here are some cases in the wild:
import _ "github.com/stretchr/testify/assert"
_ "github.com/stretchr/testify/assert"
_ "github.com/stretchr/testify/require"
_ "github.com/stretchr/testify/suite"
_ "github.com/stretchr/testify/mock"
_ "github.com/stretchr/testify/http"