- Go to the main package of your project
- execute this command in your cmd:
go build
- You will see that an executable file is created
[filename].exe
- This executable file can be run on your local directory, but to run it as a path command from your command line anywhere please follow these steps
- Type
go list -f '{{.Target}}'
to get the target location of the executable file - Follow the steps in the documentation to proceed furthur: https://go.dev/doc/tutorial/compile-install
- Type
Files
create_an_executable_file
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||