awpy/utils.py
def check_go_version():
    """Function to check the Golang version of the current machine, returns True if greater than 1.14.0"""
    try:
        proc = subprocess.Popen(["go", "version"], stdout=subprocess.PIPE)
        parsed_resp = proc.stdout.read().splitlines()
        if len(parsed_resp) != 1:
            raise ValueError("Error finding Go version")
        else:
            go_version_text = parsed_resp[0].decode("utf-8")
            go_version = re.findall(r"\d\.\d+", go_version_text)
            if int(go_version[0].replace(".", "")) >= 117:
                return True
            else:
                return False
    except Exception as e:
        print(e)
        return False
Function to check the Golang version of the current machine, returns True if greater than 1.14.0
Function to check the Golang version of the current machine, returns True if greater than 1.14.0
Function to check the Golang version of the current machine returns True if greater than 1 . 14 . 0
def check_go_version():
    try:
        proc = subprocess.Popen(["go", "version"], stdout=subprocess.PIPE)
        parsed_resp = proc.stdout.read().splitlines()
        if len(parsed_resp) != 1:
            raise ValueError("Error finding Go version")
        else:
            go_version_text = parsed_resp[0].decode("utf-8")
            go_version = re.findall(r"\d\.\d+", go_version_text)
            if int(go_version[0].replace(".", "")) >= 117:
                return True
            else:
                return False
    except Exception as e:
        print(e)
        return False
def check_go_version ( ) : try : proc = subprocess . Popen ( [ "go" , "version" ] , stdout = subprocess . PIPE ) parsed_resp = proc . stdout . read ( ) . splitlines ( ) if len ( parsed_resp ) != 1 : raise ValueError ( "Error finding Go version" ) else : go_version_text = parsed_resp [ 0 ] . decode ( "utf-8" ) go_version = re . findall ( r"\d\.\d+" , go_version_text ) if int ( go_version [ 0 ] . replace ( "." , "" ) ) >= 117 : return True else : return False except Exception as e : print ( e ) return False
Function to check the Golang version of the current machine, returns True if greater than 1.14.0
Function to check the Golang version of the current machine returns True if greater than 1 . 14 . 0
"""Function to check the Golang version of the current machine, returns True if greater than 1.14.0"""