gitlab.com/evatix-go/core@v1.3.55/coreimpl/enumimpl/UnsupportedNames.go (about)

     1  package enumimpl
     2  
     3  func UnsupportedNames(
     4  	allNames []string,
     5  	supportedNames ...string,
     6  ) []string {
     7  	unsupportedNames := make(
     8  		[]string,
     9  		0,
    10  		len(allNames)-len(supportedNames)+1)
    11  	supportedNamesHashset := toHashset(supportedNames...)
    12  
    13  	for _, name := range allNames {
    14  		_, has := supportedNamesHashset[name]
    15  
    16  		if !has {
    17  			unsupportedNames = append(
    18  				unsupportedNames,
    19  				name)
    20  		}
    21  	}
    22  
    23  	return supportedNames
    24  }