Go/Quick Start: Difference between revisions
< Go
Jump to navigation
Jump to search
(→Run) |
|||
| Line 26: | Line 26: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= | = Work with 2 modules. = | ||
Revision as of 02:30, 22 May 2025
Create a module
Create module and source file.
go mod init sandbox/hello
touch hello.go
Add source code.
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
Run.
go run .