forgejo-sdk/gitea/miscellaneous.go

14 lines
410 B
Go
Raw Normal View History

2015-12-04 22:10:37 +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
2015-12-04 22:10:37 +00:00
// ServerVersion returns the version of the server
2017-03-03 14:45:18 +00:00
func (c *Client) ServerVersion() (string, error) {
var v = struct {
Version string `json:"version"`
}{}
2019-11-24 16:30:40 +00:00
return v.Version, c.getParsedResponse("GET", "/version", nil, nil, &v)
2017-03-03 14:45:18 +00:00
}