forked from abice/go-enum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.go
29 lines (28 loc) · 746 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2017 Alex Bice
// go-enum is a utility for generating a more functional version of
// enumerations in go.
//
// The generator looks for the exact string `ENUM(` and will continue
// to store comma separated values until it finds a `)`. Those values
// can be on one line, or separate lines; they can include `_` in order
// to skip a value in the enum that won't be an allowed value.
//
// Installation
// go get -u github.com/marusama/go-enum
//
// Usage:
// Sample File
// //go:generate go-enum -f=myenum.go --marshal --
//
// package mypackage
//
// // MyEnum docs here
// // ENUM(Value1, Value2
// // Value3,_,
// // Value4)
// type MyEnum int
//
// Command to generate your enum
// go generate ./
//
package main