"Go ptr.To()"의 두 판 사이의 차이

잔글 (Jmnote님이 K8s.io/utils/ptr 문서를 Go ptr.To() 문서로 이동했습니다)
 
1번째 줄: 1번째 줄:
==개요==
==개요==
{{소문자}}
;k8s.io/utils/ptr
;k8s.io/utils/ptr



2024년 7월 4일 (목) 01:38 기준 최신판

1 개요[ | ]

k8s.io/utils/ptr
package main

import (
	"fmt"

	"k8s.io/utils/ptr"
)

func main() {
	var s string = "Hello, world!"
	var p *string = ptr.To(s)
	fmt.Println(*p) // Hello, world!
	fmt.Println(p)  // 0xc00008e040
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}