# go-gitee-sdk-v5 **Repository Path**: oscstudio/go-gitee-sdk-v5 ## Basic Information - **Project Name**: go-gitee-sdk-v5 - **Description**: A Go client library for interacting with the [Gitee API v5](https://gitee.com/api/v5/swagger) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-23 - **Last Updated**: 2025-09-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Gitee Go Client SDK V5 A Go client library for interacting with the [Gitee API v5](https://gitee.com/api/v5/swagger), including support for repository management and lightweight pull requests. ## Features - Repository information retrieval - Issue management (create/list/get/update) - Lightweight Pull Request creation - User profile access - CVE issue bulk checking - Easy authentication with Bearer tokens - Simple, idiomatic Go API ## Usage ```sh go get gitee.com/oscstudio/go-gitee-sdk-v5 ``` ## Example Usage ```go package main import ( "context" "fmt" gitee "gitee.com/oscstudio/go-gitee-sdk-v5" ) func main() { client := gitee.NewClient("") client.SetBearerToken("your-gitee-token") // Get repository information repo, err := client.GetRepository(context.Background(), "edmondfrank", "Servy") if err != nil { fmt.Printf("Error getting repository: %v\n", err) return } fmt.Printf("Repository %s has %d stars\n", repo.FullName, repo.StargazersCount) // Get single issue issue, err := client.GetIssue(context.Background(), "owner-name", "repo-name", "ident") if err != nil { // handle error } fmt.Printf("Issue #%s: %s\n", issue.Number, issue.Title) // Bulk check CVE issues cveRequest := &gitee.BulkCheckCVERequest{ CVEIDs: []string{"CVE-2021-1234", "CVE-2021-5678"}, State: "open", } issueCVEs, err := client.BulkCheckCVE(context.Background(), "owner-name", "repo-name", cveRequest) if err != nil { // handle error } for _, issueCVE := range issueCVEs { fmt.Printf("Issue ID: %d, CVE ID: %s, State: %s\n", issueCVE.IssueID, issueCVE.CVEID, issueCVE.State) } // Get current user user, err := client.GetCurrentUser(context.Background()) if err != nil { // handle error } fmt.Printf("Logged in as %s (%s)\n", user.Name, user.Login) } ``` ## CLI Usage ```bash # Get repository issues ./gitee-cli -token YOUR_TOKEN -owner OWNER -repo REPO -list-issues # Get single issue ./gitee-cli -token YOUR_TOKEN -owner OWNER -repo REPO -get-issue -number ISSUE_NUMBER # Get current user info ./gitee-cli -token YOUR_TOKEN -current-user # Create new issue ./gitee-cli -token YOUR_TOKEN -owner OWNER -create-issue \ -repo REPO \ -issue-title "Bug Report" \ -issue-body "Description of issue" ```