gitlab.com/evatix-go/core@v1.3.55/ostype/GetGroup.go (about)

     1  package ostype
     2  
     3  import (
     4  	"gitlab.com/evatix-go/core/osconsts"
     5  )
     6  
     7  // GetGroup rawRuntimeGoos = runtime.GOOS
     8  func GetGroup(rawRuntimeGoos string) Group {
     9  	if rawRuntimeGoos == osconsts.Windows {
    10  		return WindowsGroup
    11  	}
    12  
    13  	if rawRuntimeGoos == osconsts.Android {
    14  		return AndroidGroup
    15  	}
    16  
    17  	isUnixGroup, has := osconsts.UnixGroupsMap[rawRuntimeGoos]
    18  
    19  	if has && isUnixGroup {
    20  		return UnixGroup
    21  	}
    22  
    23  	return InvalidGroup
    24  }