What wrong it?can give me soution?

go: unknown subcommand "install…/src/main/main.go"
Run ‘go help’ for usage.

Looks like a space is missing after the word “install”.

go install .../src/main/main.go

Edited to add: If you install .go files directly, you might have to set the GOBIN environment variable. The usual form of install is

go install <package_name>

where <package_name> is a package name, or the path to a package. When <package_name>´ is omitted,go install` installs the package that it finds in the current directory.
So in your case, you can try

cd .../src/main
go install

and this should compile and install your code.

thank sir

You’re welcome.

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