File tree 1 file changed +2
-10
lines changed
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -238,15 +238,6 @@ func (u *Updater) fetchBin() ([]byte, error) {
238
238
return buf .Bytes (), nil
239
239
}
240
240
241
- func (u * Updater ) fetchInfo () error {
242
- info , err := fetchInfo (u .APIURL , u .CmdName )
243
- if err != nil {
244
- return err
245
- }
246
- u .Info = info
247
- return nil
248
- }
249
-
250
241
func (u * Updater ) getExecRelativeDir (dir string ) string {
251
242
filename , _ := os .Executable ()
252
243
path := filepath .Join (filepath .Dir (filename ), dir )
@@ -267,11 +258,12 @@ func (u *Updater) update() error {
267
258
}
268
259
defer old .Close ()
269
260
270
- err = u . fetchInfo ()
261
+ info , err := fetchInfo (u . APIURL , u . CmdName )
271
262
if err != nil {
272
263
log .Println (err )
273
264
return err
274
265
}
266
+ u .Info = info
275
267
if u .Info .Version == u .CurrentVersion {
276
268
return nil
277
269
}
You can’t perform that action at this time.
0 commit comments