func CheckNodeVersion(reqVersion string, minVersion string) (bool, error) {
	splt := strings.Split(reqVersion, "/")
	if len(splt) > 2 {
		return false, errors.New("invalid client version")
	}
	if len(splt) == 2 {
		reqVersion = splt[1]
	}
	if reqVersion == minVersion {
		return true, nil
	}
	reqsplit, minsplit := strings.Split(reqVersion, "."), strings.Split(minVersion, ".")
	if len(reqsplit) != 3 || len(minsplit) != 3 {
		return false, fmt.Errorf("one of provided versions isn't valid %v / %v", reqVersion, minVersion)
	}
	numa, numb := [3]int64{}, [3]int64{}
	for i := 0; i < 3; i++ {
		var err error
		numa[i], err = strconv.ParseInt(reqsplit[i], 10, 8)
		if err != nil {
			return false, fmt.Errorf(" could not read version number %v", reqVersion)
		}
		numb[i], err = strconv.ParseInt(minsplit[i], 10, 8)
		if err != nil {
			return false, fmt.Errorf(" could not read version number %v", reqVersion)
		}
	}
	for i := 0; i < 2; i++ {
		if numa[i] > numb[i] {
			return true, nil
		}
		if numa[i] != numb[i] {
			return false, nil
		}
	}
	return false, nil
}
CheckNodeVersion checks if a request version is more recent then the given min version. returns a bool and an error
package version
import (
	"errors"
	"fmt"
	"strconv"
	"strings"
)