AppendBool appends "true" or "false", according to the value of b, to dst and returns the extended buffer.
package main import ( "fmt" "strconv" ) func main() { b := []byte("bool:") b = strconv.AppendBool(b, true) fmt.Println(string(b)) }