2019-04-25 17:06:53 +00:00
|
|
|
// Copyright 2015 The Gogs Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package gitea
|
|
|
|
|
|
|
|
// ServerVersion returns the version of the server
|
|
|
|
func (c *Client) ServerVersion() (string, error) {
|
2019-10-13 15:13:33 +00:00
|
|
|
var v = struct {
|
|
|
|
Version string `json:"version"`
|
|
|
|
}{}
|
2020-01-04 01:44:33 +00:00
|
|
|
return v.Version, c.getParsedResponse("GET", "/version", nil, nil, &v)
|
2019-04-25 17:06:53 +00:00
|
|
|
}
|