Skip to content

Commit

Permalink
Send the real version of Cheesegull at GET /
Browse files Browse the repository at this point in the history
  • Loading branch information
thehowl committed Mar 24, 2018
1 parent 2533c25 commit 61bd3d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import (
"expvar"
)

// Version is set by main and it is given to requests at /
var Version = "2.x"

func index(c *Context) {
c.WriteHeader("Content-Type", "text/plain; charset=utf-8")
c.Write([]byte("CheeseGull v2.x Woo\nFor more information: https://github.com/osuripple/cheesegull"))
c.Write([]byte("CheeseGull v" + Version + " Woo\nFor more information: https://github.com/osuripple/cheesegull"))
}

var _evh = expvar.Handler()
Expand Down
1 change: 1 addition & 0 deletions cheesegull.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func main() {
kingpin.Parse()

fmt.Println("CheeseGull", Version)
api.Version = Version

// set up osuapi client
c := osuapi.NewClient(*osuAPIKey)
Expand Down

0 comments on commit 61bd3d4

Please sign in to comment.