upgrade to go 1.18, use generics

This commit is contained in:
Shivaram Lingamneni 2022-03-30 00:44:51 -04:00
parent 446c654dea
commit a549827f17
15 changed files with 60 additions and 67 deletions

View file

@ -704,8 +704,8 @@ type Config struct {
// OperClass defines an assembled operator class.
type OperClass struct {
Title string
WhoisLine string `yaml:"whois-line"`
Capabilities utils.StringSet // map to make lookups much easier
WhoisLine string `yaml:"whois-line"`
Capabilities utils.HashSet[string] // map to make lookups much easier
}
// OperatorClasses returns a map of assembled operator classes from the given config.
@ -743,7 +743,7 @@ func (conf *Config) OperatorClasses() (map[string]*OperClass, error) {
// create new operclass
var oc OperClass
oc.Capabilities = make(utils.StringSet)
oc.Capabilities = make(utils.HashSet[string])
// get inhereted info from other operclasses
if len(info.Extends) > 0 {