SWIG/Examples/go/constants/

Wrapping C Constants

When SWIG encounters C preprocessor macros and C declarations that look like constants, it creates a Go constant with an identical value. Click here to see a SWIG interface with some constant declarations in it.

Accessing Constants from Go

Click here for the section on constants in the SWIG and Go documentation.

Click here to see a Go program that prints out the values of the constants contained in the above file.

Key points