Standard library / go/constant
go/constant.MakeBool()
Create a boolean constant. Expected stdout: 'Bool\n'.
Formal Syntax & Structure
go syntaxgo
func MakeBool(b bool) ValueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| b | bool | Boolean value to represent. |
Return Value
Value
Create a boolean constant.
Working Example
Example Snippetgo
package main
import ( "fmt" "go/constant")
func main() { fmt.Println(constant.MakeBool(true).Kind()) }