diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-29 09:55:12 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-29 09:55:12 +0300 |
| commit | 90e3fc07894c754364809c4733e403bf4fdeb484 (patch) | |
| tree | dba3e2d2297686c90b077b2734f3c5d9ea9a1e47 /doc/api-reference.md | |
| parent | 820c24ffb8bfdd2cd7cba1a5d599cbd6d092ad81 (diff) | |
refactor(cli): remove dead legacy flag layer (rq)
Diffstat (limited to 'doc/api-reference.md')
| -rw-r--r-- | doc/api-reference.md | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/doc/api-reference.md b/doc/api-reference.md index c189e99..b7ed2f8 100644 --- a/doc/api-reference.md +++ b/doc/api-reference.md @@ -24,7 +24,7 @@ The main package provides the application entry point. #### func main() Application entry point that: -- Parses command-line flags +- Initializes Cobra commands - Routes to appropriate handlers - Manages exit codes @@ -60,36 +60,18 @@ type Flags struct { ### Functions -#### func ParseFlags() *Flags -Parses command-line arguments and returns a Flags struct with all options. - -#### func HandleVersion() int -Displays version information and returns exit code 0. - #### func HandleTestGitHubToken() int Tests GitHub token authentication: - Loads token from config/env/file - Validates token with API call - Returns 0 on success, 1 on failure -#### func LoadConfig(configPath string) (*config.Config, error) -Loads configuration from specified path or default locations: -- `./gitsyncer.json` -- `~/.config/gitsyncer/config.json` -- `~/.gitsyncer.json` - -#### func ShowConfigHelp() -Displays help for creating configuration files with example. - #### func HandleListOrgs(cfg *config.Config) int Lists all configured organizations from config. #### func HandleListRepos(cfg *config.Config) int Lists all configured repositories from config. -#### func ShowUsage(cfg *config.Config) -Displays comprehensive usage information. - #### func HandleSync(cfg *config.Config, flags *Flags) int Synchronizes a single repository specified by `--sync` flag. @@ -102,9 +84,6 @@ Discovers and syncs all public Codeberg repositories to other platforms. #### func HandleSyncGitHubPublic(cfg *config.Config, flags *Flags) int Discovers and syncs all public GitHub repositories to other platforms. -#### func ShowFullSyncMessage() -Displays information about full sync mode. - ### Helper Functions (sync_handlers.go) #### func createGitHubRepoIfNeeded(cfg *config.Config, repoName string) error |
