Skip to content

Commit

Permalink
use constant for repoSlup
Browse files Browse the repository at this point in the history
  • Loading branch information
tlanfer committed Jul 19, 2024
1 parent 33002f6 commit 6c73e0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions companion/internal/adapter/outbound/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import (

var Version string

const repoSlug = "tlanfer/squirtttv"

func IsLatest() (string, bool, error) {
latest, found, err := selfupdate.DetectLatest(context.Background(), selfupdate.ParseSlug("tlanfer/squirtttv"))
latest, found, err := selfupdate.DetectLatest(context.Background(), selfupdate.ParseSlug(repoSlug))

if err != nil {
return "", false, fmt.Errorf("failed to detect latest version: %v", err)
Expand All @@ -24,7 +26,7 @@ func IsLatest() (string, bool, error) {
}

func Run() error {
latest, found, err := selfupdate.DetectLatest(context.Background(), selfupdate.ParseSlug("tlanfer/squirtttv"))
latest, found, err := selfupdate.DetectLatest(context.Background(), selfupdate.ParseSlug(repoSlug))

if err != nil {
return fmt.Errorf("failed to detect latest version: %v", err)
Expand Down

0 comments on commit 6c73e0c

Please sign in to comment.