Using dot import in test

(Andre) #1

Whad does this import mean when we use point in imports?

import (

	"." // what is this?

(Norbert Melzer) #2

It imports the package from the folder the test is in.

This is often easier than spelling it out, but importing is still necessary when one uses a _test package.

Also, IIRC exported items are imported unqualified and will be put directly in the test packages namespace.

(system) closed #3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.