Identifier

Go blank identifier _

Discards an assigned value or marks an intentionally unused binding in specific grammar contexts. It is not a variable that can be read. Blank imports run package initialization without binding the imported package name. Example output: 'true'.

Formal Syntax & Structure

go syntaxgo
_

Working Example

Example Snippetgo
package main
import (  "fmt")
func main() {  _, ok := map[string]int{"a": 1}["a"]  fmt.Println(ok)}
Go Reference