gitivity/main.go

22 lines
418 B
Go
Raw Normal View History

2024-03-16 14:08:19 -05:00
package main
import (
"os"
"fmt"
"code.gitea.io/sdk/gitea"
)
func main() {
client, err := gitea.NewClient("https://code.retroedge.tech")
if err != nil {
fmt.Printf("Failed to create Gitea client! (%s)\n", err)
os.Exit(1)
}
server_version, _, err := client.ServerVersion()
if err != nil {
fmt.Printf("Failed to get server version! (%s)\n", err)
}
fmt.Printf("Server version: %s\n", server_version)
}