개요
Go
Copy
package main
import "fmt"
func boolPtr(b bool) *bool {
return &b
}
func main() {
truePtr := boolPtr(true)
falsePtr := boolPtr(false)
fmt.Println("truePtr:", *truePtr)
fmt.Println("falsePtr:", *falsePtr)
}
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.