diff --git a/README.md b/README.md index 7809b76..4c6bc38 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ This project acts as a client SDK implementation written in Go to interact with import "code.gitea.io/sdk/gitea" ``` +## Version Requirements + * go >= 1.13 + * gitea >= 1.10 + ## Contributing Fork -> Patch -> Push -> Pull Request diff --git a/gitea/client.go b/gitea/client.go index 7f03b59..7516ff6 100644 --- a/gitea/client.go +++ b/gitea/client.go @@ -55,6 +55,9 @@ func NewClient(url string, options ...func(*Client)) (*Client, error) { for _, opt := range options { opt(client) } + if err := client.CheckServerVersionConstraint(">=1.10"); err != nil { + return nil, err + } return client, nil }