Skip to content

tnnmigga/enum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

package main

import (
	"fmt"

	"github.com/tnnmigga/enum"
)

var EnumTestInt = enum.New[struct {
	ZERO int
	ONE  int
	TWO  int
}]()

var EnumTestStr = enum.New[struct {
	ZERO string
	ONE  string
	TWO  string
}]()

func main() {
	fmt.Println(EnumTestInt.ZERO, EnumTestInt.ONE, EnumTestInt.TWO)
	fmt.Println(EnumTestStr.ZERO, EnumTestStr.ONE, EnumTestStr.TWO)
}

// 
// 0 1 2
// ZERO ONE TWO

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages