Skip to content

Commit ca9c9fb

Browse files
committed
Renamed method for clarity
1 parent 30531ca commit ca9c9fb

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func main() {
158158
log.Println("Copy error: ", err)
159159
panic(err)
160160
}
161-
Systray.Update(newPath)
161+
Systray.RestartWith(newPath)
162162
} else {
163163
// Otherwise copy to a path with -temp suffix
164164
if err := copyExe(src, updater.AddTempSuffixToPath(src)); err != nil {

systray/systray.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ func (s *Systray) Resume() {
9292
s.Restart()
9393
}
9494

95-
// Update restarts the program with the given path
96-
func (s *Systray) Update(path string) {
95+
// RestartWith restarts the program with the given path
96+
func (s *Systray) RestartWith(path string) {
9797
s.path = path
9898
s.Restart()
9999
}

update.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@ func updateHandler(c *gin.Context) {
6464
path = updater.AddTempSuffixToPath(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)