Standard library / log/slog
slog.BoolValue()
Construct an unkeyed Bool value for use in an attribute. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func BoolValue(v bool) ValueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| v | bool | Values to log or convert. |
Return Value
Value
Construct an unkeyed Bool value for use in an attribute.
Working Example
Example Snippetgo
package main
import ( "fmt" "log/slog")
func main() { fmt.Println(slog.BoolValue(true)) }