File tree 4 files changed +4
-9
lines changed
src/internal/up2date/client
4 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ require (
6
6
github.com/avfs/avfs v0.30.0
7
7
github.com/gorilla/websocket v1.5.3
8
8
github.com/hashicorp/go-version v1.7.0
9
- github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
10
9
github.com/koron/go-ssdp v0.0.4
11
10
golang.org/x/text v0.16.0
12
11
)
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aN
4
4
github.com/gorilla/websocket v1.5.3 /go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE =
5
5
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY =
6
6
github.com/hashicorp/go-version v1.7.0 /go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA =
7
- github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA =
8
- github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 /go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8 =
9
7
github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0 =
10
8
github.com/koron/go-ssdp v0.0.4 /go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk =
11
9
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ =
Original file line number Diff line number Diff line change 5
5
"encoding/json"
6
6
"errors"
7
7
"fmt"
8
- "io/ioutil "
8
+ "io"
9
9
"net"
10
10
"net/http"
11
11
"net/url"
@@ -113,7 +113,7 @@ func serverRequest() (err error) {
113
113
Updater .CMD = ""
114
114
defer resp .Body .Close ()
115
115
116
- body , _ := ioutil .ReadAll (resp .Body )
116
+ body , _ := io .ReadAll (resp .Body )
117
117
118
118
err = json .Unmarshal (body , & serverResponse )
119
119
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ import (
12
12
"runtime"
13
13
"strings"
14
14
"syscall"
15
-
16
- "github.com/kardianos/osext"
17
15
)
18
16
19
17
// DoUpdate : Update binary
@@ -50,7 +48,7 @@ func DoUpdate(fileType, filenameBIN string) (err error) {
50
48
}
51
49
52
50
// Change binary filename to .filename
53
- binary , err := osext .Executable ()
51
+ binary , err := os .Executable ()
54
52
var filename = getFilenameFromPath (binary )
55
53
var path = getPlatformPath (binary )
56
54
var oldBinary = path + "_old_" + filename
@@ -150,7 +148,7 @@ func DoUpdate(fileType, filenameBIN string) (err error) {
150
148
} else {
151
149
152
150
// Restart binary (Linux and UNIX)
153
- file , _ := osext .Executable ()
151
+ file , _ := os .Executable ()
154
152
os .RemoveAll (oldBinary )
155
153
err = syscall .Exec (file , os .Args , os .Environ ())
156
154
if err != nil {
You can’t perform that action at this time.
0 commit comments