Skip to content

Commit cfb2849

Browse files
committed
Renamed method for clarity
1 parent 75126cf commit cfb2849

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func main() {
180180
panic(err)
181181
}
182182

183-
Systray.Update(newPath)
183+
Systray.RestartWith(newPath)
184184
} else {
185185
// Otherwise copy to a path with -temp suffix
186186
err := copyExe(srcPath.String(), updater.TempPath(srcPath.String()))

systray/systray.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ func (s *Systray) Resume() {
9090
s.Restart()
9191
}
9292

93-
// Update restarts the program with the given path
94-
func (s *Systray) Update(path string) {
93+
// RestartWith restarts the program with the given path
94+
func (s *Systray) RestartWith(path string) {
9595
s.path = path
9696
s.Restart()
9797
}

update.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@ func updateHandler(c *gin.Context) {
6464
path = updater.TempPath(path)
6565

6666
c.JSON(200, gin.H{"success": "Please wait a moment while the agent reboots itself"})
67-
Systray.Update(path)
67+
68+
Systray.RestartWith(path)
6869
}

0 commit comments

Comments
 (0)