Slide 23
Slide 23 text
var current = semver.MustParse("0.2.0")
func main() {
means, _ := updater.SelectAvailableMeansFrom(
context.Background(),
brew.HomebrewMeans("ktr0731/evans", "evans"),
github.GitHubReleaseMeans("ktr0731", "evans", nil),
)
u := updater.New(current, means)
updatable, new, _ := u.Updatable(context.Background())
if updatable {
_ = u.Update(context.Background())
fmt.Printf("updated: %s ! %s\n", current, new)
}
}