use of package without selector

TL;DR

In case found “use of package {package name} without selector” while building Golang, you should check if the name of package is declared in spite of the name was the reserved word.


The namespace in Golang should be simple and it’s a one of differences than other languages such as Java.

Package names - The Go Programming Language

Then I followed the rules and declared ‘new’ package, then I stacked due to the above error.

use of package new without selector

Please be careful if you use reserved words too much to simplify the package name.

go - Getting a use of package without selector error - Stack Overflow