From 8a791640a5470d98654d25e1c86b15c56a1ee28a Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 12 Nov 2020 03:08:29 -0800 Subject: [PATCH] add iota example to go --- go/iota.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 go/iota.go diff --git a/go/iota.go b/go/iota.go new file mode 100644 index 0000000..e0c535d --- /dev/null +++ b/go/iota.go @@ -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