Home > Software design >  Intellij says my golang Package import contains test files only and asks me to delete import
Intellij says my golang Package import contains test files only and asks me to delete import

Time:07-14

IntelliJ reports an error on my import stating that package contains test files only and asks me to delete the import.

It also doesn't recognize the object.

However, the package contains enter image description here

CodePudding user response:

containernetworking/plugins/pkg/ns directory has _linux.go namespaces so you should configure the corresponding OS if that differs from your main one in GoLand settings: Preferences | Go | Build Tags & Vendoring (set OS to Linux).

  • Related