func GetWslHostName() string {
	out, err := exec.Command("wsl.exe", "hostname", "-I").Output()
	if err != nil {
		return "localhost"
	}
	return strings.TrimSpace(string(out))
}
Gets the subsystem host ip
If the CLI is running under WSL the localhost url will not work so
this function should return the real ip that we should redirect to
package utils
import (
	"os/exec"
	"regexp"
	"strings"
)
func CheckIfWsl() bool {
	out, err := exec.Command("uname", "-a").Output()
	if err != nil {
		return false
	}
	matched, _ := regexp.Match(`microsoft|Microsoft`, out)
	return matched
}