mirror of
https://github.com/railwayapp/cli
synced 2026-04-21 14:07:23 +00:00
13 lines
261 B
Go
13 lines
261 B
Go
package controller
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
func (c *Controller) GetLatestVersion() (string, error) {
|
|
rep, _, err := c.ghc.Repositories.GetLatestRelease(context.Background(), "railwayapp", "cli")
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
return *rep.TagName, nil
|
|
}
|