From 4631b81e5c7b30161cafacc8245eff53ddc6b39f Mon Sep 17 00:00:00 2001 From: wbtiger <28288271@qq.com> Date: Fri, 29 May 2026 23:59:40 +0800 Subject: [PATCH] style: fix gofmt alignment in root.go and register.go --- cmd/root.go | 10 +++++----- shortcuts/register.go | 40 ++++++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 0ed4c669..441a8ed7 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -6,9 +6,9 @@ import ( "github.com/spf13/cobra" - "github.com/gitlink-org/gitlink-cli/cmd/cmdutil" - authCmd "github.com/gitlink-org/gitlink-cli/cmd/auth" apiCmd "github.com/gitlink-org/gitlink-cli/cmd/api" + authCmd "github.com/gitlink-org/gitlink-cli/cmd/auth" + "github.com/gitlink-org/gitlink-cli/cmd/cmdutil" configCmd "github.com/gitlink-org/gitlink-cli/cmd/config" "github.com/gitlink-org/gitlink-cli/shortcuts" ) @@ -16,9 +16,9 @@ import ( var Version = "dev" var rootCmd = &cobra.Command{ - Use: "gitlink-cli", - Short: "GitLink CLI — command-line tool for gitlink.org.cn", - Long: `gitlink-cli is a command-line interface for the GitLink (确实开源) platform, providing repository management, issue tracking, pull requests, CI/CD, and AI-powered workflows.`, + Use: "gitlink-cli", + Short: "GitLink CLI — command-line tool for gitlink.org.cn", + Long: `gitlink-cli is a command-line interface for the GitLink (确实开源) platform, providing repository management, issue tracking, pull requests, CI/CD, and AI-powered workflows.`, SilenceUsage: true, SilenceErrors: true, } diff --git a/shortcuts/register.go b/shortcuts/register.go index 49b20ed6..d42a5b69 100644 --- a/shortcuts/register.go +++ b/shortcuts/register.go @@ -23,37 +23,37 @@ import ( // RegisterAll mounts all shortcut groups onto the root command. func RegisterAll(root *cobra.Command) { groups := map[string][]*common.Shortcut{ - "repo": repo.Shortcuts(), + "repo": repo.Shortcuts(), "issue": issue.Shortcuts(), "member": member.Shortcuts(), "milestone": milestone.Shortcuts(), "pr": pr.Shortcuts(), - "release": release.Shortcuts(), - "branch": branch.Shortcuts(), - "org": org.Shortcuts(), - "user": user.Shortcuts(), - "search": search.Shortcuts(), - "ci": ci.Shortcuts(), - "compare": compare.Shortcuts(), - "webhook": webhook.Shortcuts(), - "workflow": workflow.Shortcuts(), + "release": release.Shortcuts(), + "branch": branch.Shortcuts(), + "org": org.Shortcuts(), + "user": user.Shortcuts(), + "search": search.Shortcuts(), + "ci": ci.Shortcuts(), + "compare": compare.Shortcuts(), + "webhook": webhook.Shortcuts(), + "workflow": workflow.Shortcuts(), } descriptions := map[string]string{ - "repo": "Repository operations", + "repo": "Repository operations", "issue": "Issue operations", "member": "Repository member operations", "milestone": "Milestone operations", "pr": "Pull request operations", - "release": "Release operations", - "branch": "Branch operations", - "org": "Organization operations", - "user": "User operations", - "search": "Search operations", - "ci": "CI/CD operations", - "compare": "Compare branches, tags, or commits", - "webhook": "Webhook operations", - "workflow": "AI agent workflow analysis", + "release": "Release operations", + "branch": "Branch operations", + "org": "Organization operations", + "user": "User operations", + "search": "Search operations", + "ci": "CI/CD operations", + "compare": "Compare branches, tags, or commits", + "webhook": "Webhook operations", + "workflow": "AI agent workflow analysis", } for name, shortcuts := range groups {