Built-in function
Go print()
Implementation-oriented debugging facility, not a stable formatting API. Supported operand types and representation are implementation-dependent; it may write to standard error. Prefer fmt.Print for application output. In the local toolchain, the example writes 42 to stderr without a newline.
Formal Syntax & Structure
go syntaxgo
print(values...)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| values | implementation-supported values | Zero or more values to display. |
Working Example
Example Snippetgo
package main
func main() { print(42)}