Skip to content

Commit

Permalink
feat: create IsLatestVersion function
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanCapistrano committed Jul 24, 2023
1 parent 65b24b7 commit af1b14c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions config/updater.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package config

import (
"github.com/tcnksm/go-latest"
)

func IsLatestVersion(version string) bool {
githubTag := &latest.GithubTag{
Owner: "AllanCapistrano",
Repository: "gbc",
}

res, _ := latest.Check(githubTag, version)

return !res.Outdated
}

0 comments on commit af1b14c

Please sign in to comment.