Change go version to 1.20 for Windows 7 support

This commit is contained in:
Alex X
2024-09-01 15:56:19 +03:00
parent afc8f4fdf6
commit 2311d5eabe
12 changed files with 74 additions and 21 deletions
+1 -2
View File
@@ -10,7 +10,6 @@ import (
"net/url"
"os"
"os/exec"
"slices"
"strings"
"sync"
"time"
@@ -230,7 +229,7 @@ func trimSpace(b []byte) []byte {
func setRemoteInfo(info core.Info, source string, args []string) {
info.SetSource(source)
if i := slices.Index(args, "-i"); i > 0 && i < len(args)-1 {
if i := core.Index(args, "-i"); i > 0 && i < len(args)-1 {
rawURL := args[i+1]
if u, err := url.Parse(rawURL); err == nil && u.Host != "" {
info.SetRemoteAddr(u.Host)