enumconv

package
v0.0.0-...-b766576 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2013 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package enumconv provides helper functions for gocog, used in gsnmpgo/stringers.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(gotypename string, ctypename string, enums []string, ccode string, start_at int)

Write uses gocog to produce Go boilerplate and Stringers for C enums.

gotypename: the go type name of this C enum

ctypename: the C type name of this enum (with "_Ctype_")

enums: slice of strings containing names of enums

ccode: any C code to be included in Stringer comment header

start_at: value to start the enum at

I decided not to parse the C enum typedefs and instead opted to pass in fields like gotypename and ctypename, as parsing would be overkill for this project.

Types

This section is empty.

Jump to

Keyboard shortcuts

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