Go/Quick Start: Difference between revisions

From Fundamental Ramen
< Go
Jump to navigation Jump to search
Line 26: Line 26:
</syntaxhighlight>
</syntaxhighlight>


= Run =
= 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 .

Work with 2 modules.