tms

command module
v0.0.0-...-e2715af Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 12 Imported by: 0

README

TMS

generate map and slice by type

download
go get -u github.com/ganluo960214/tms
flags
-type string
    type name; must be set
-map
    generate map (default true)
-slice
    generate slice (default true)
usage
//go:generate tms -type=Type
example
//go:generate tms -type=Type
type Type byte

const (
    TypeCA Type = iota + 1
    TypeCB
    TypeCC
    TypeCD
    TypeCE
)
// Code generated by "tms -type=Type"; DO NOT EDIT.

var (
	TMS_Type_Map = map[Type]interface{}{
		TypeCA: nil,
		TypeCB: nil,
		TypeCC: nil,
		TypeCD: nil,
		TypeCE: nil,
	}

	TMS_Type_Slice = []Type{
		TypeCA,
		TypeCB,
		TypeCC,
		TypeCD,
		TypeCE,
	}
)

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