add iota example to go

This commit is contained in:
Jeffrey Paul 2020-11-12 03:08:29 -08:00
부모 b79a9b98f3
커밋 8a791640a5
1개의 변경된 파일23개의 추가작업 그리고 0개의 파일을 삭제

23
go/iota.go Normal file
파일 보기

@ -0,0 +1,23 @@
package main
// from https://humungus.tedunangst.com/r/honk/v/tip/f/hfcs.go
type filtType uint
const (
filtNone filtType = iota
filtAny
filtReject
filtSkipMedia
filtHide
filtCollapse
filtRewrite
)
var filtNames = []string{"None", "Any", "Reject", "SkipMedia", "Hide", "Collapse", "Rewrite"}
func (ft filtType) String() string {
return filtNames[ft]
}
type afiltermap map[filtType][]*Filter