17.C_init_func

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 3 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL