When the file is imported, the case of the path is not correct. It was compiled under Mac, but not under docker and CentOS.
===
An error is reported in the operation as follows:
[root@localhost ginlaravel]# go run server.go
routes/route.go:19:2: cannot find package "." in:
/home/wwwroot/go/src/ginlaravel/app/http/Controller
routes/route.go:20:2: cannot find package "." in:
/home/wwwroot/go/src/ginlaravel/app/http/Controller/Gen1Controller
Or an error will be reported when running as follows:
[root@localhost ginlaravel]# go build -mod=mod
routes/route.go:19:2: package ginlaravel/app/http/Controller is not in GOROOT (/usr/local/go/src/ginlaravel/app/http/Controller)
routes/route.go:20:2: package ginlaravel/app/http/Controller/Gen1Controller is not in GOROOT (/usr/local/go/src/ginlaravel/app/http/Controller/Gen1Controller)
In fact, the above two are written in lowercase for the uppercase HTTP of the custom space naming path.
–
Read More:
- Error report of GoLand project after go reloading Error:cannot find The solution of package error
- Go run error go run: cannot run non main package
- Go get github.com/kotakanbe/go -Problems encountered in CVE dictionary Download
- Pycharm: cann‘t find declaration to go
- An error occurred when running ROCR: Failed to load the package ‘caTools’, package or namespace load failed
- How to Fix unexpected directory layout in go language
- package xxx does not exist cannot find symbol
- Record the python package EXE file running error importerror, but do not prompt specific error solution
- Unknown error: cannot find chrome binary when running selenium under Linux
- devtools Error: Could not find package root
- (transfer) using Wireshark package capture software to prompt the NPF driver isn’t running solution
- What to do when idea Maven package appears could not find artifact xxxxx!
- [Solved] Scala signature package has wrong version expected: 5.0 found: 5.2 in package.class
- Idea Maven project uses package to package and report error (package does not exist)
- The introduction of third-party jar package in mavn project results in classnotfoundexception
- Idea can’t find the solution of XML configuration by running project prompt through external Tomcat
- AndroidStudio Android Unknown failure: Can’t find service: package
- Install additional stage package for streamsets – error in cdh6.3.0 package rest API call error: java.io.eofexception
- Zip to decompress the jar package, like the add file in the jar package
- The installation of ThinkPHP reported an error. Could not find package topthink / think with stability stable