go a 源码

  • 2022-07-15
  • 浏览 (809)

golang a 代码

文件路径:/test/fixedbugs/issue4879.dir/a.go

package a

import (
	"unsafe"
)

type Collection struct {
	root unsafe.Pointer
}

type nodeLoc struct{}

type slice []int

type maptype map[int]int

func MakePrivateCollection() *Collection {
	return &Collection{
		root: unsafe.Pointer(&nodeLoc{}),
	}
}

func MakePrivateCollection2() *Collection {
	return &Collection{
		root: unsafe.Pointer(&slice{}),
	}
}
func MakePrivateCollection3() *Collection {
	return &Collection{
		root: unsafe.Pointer(&maptype{}),
	}
}

相关信息

go 源码目录

相关文章

go b 源码

0  赞