forgejo-sdk/gitea/miscellaneous.go
Lunny Xiao 38803cbe75 Refactor codes to remove structs and depend them on code.gitea.io/gitea/modules/structs (#171)
* refactor codes to remove structs and depend them on code.gitea.io/gitea/modules/structs

* fix testing
2019-05-11 18:38:52 +03:00

13 lines
436 B
Go

// 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
import "code.gitea.io/gitea/modules/structs"
// ServerVersion returns the version of the server
func (c *Client) ServerVersion() (string, error) {
v := structs.ServerVersion{}
return v.Version, c.getParsedResponse("GET", "/api/v1/version", nil, nil, &v)
}