Discover Packages
github.com/devlights/try-golang-cgo
17.C_init_func
command
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Oct 7, 2025
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
これは何?
cgoを利用している場合でも init()
は、ちゃんと呼び出されるのかについてのサンプルです。
結論としては、「ちゃんと呼び出されている」でした。
$ task
task: [default] go run .
>> main.init() called
>> cfuncs.init() called
>> exports.init() called
>> gofuncs.init() called
map[cfuncs:true exports:true gofuncs:true main:true]
helloworld
func1
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.