go-run: add package example and fix link (#6827)
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
# go run
|
# go run
|
||||||
|
|
||||||
> Compile and run Go code.
|
> Compile and run Go code without saving a binary.
|
||||||
> Does not leave a binary on the disk.
|
> More information: <https://pkg.go.dev/cmd/go#hdr-Compile_and_run_Go_program>.
|
||||||
> More information: <https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies>.
|
|
||||||
|
|
||||||
- Run a Go file:
|
- Run a Go file:
|
||||||
|
|
||||||
`go run {{path/to/file.go}}`
|
`go run {{path/to/file.go}}`
|
||||||
|
|
||||||
|
- Run a main Go package:
|
||||||
|
|
||||||
|
`go run {{path/to/package}}`
|
||||||
|
Reference in New Issue
Block a user