Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaybePrintUpdateNudge ¶
MaybePrintUpdateNudge writes a one-line "new release available" footer to `out` when the cache says a newer version exists. Safe no-op when the cache is empty or the running binary is already current.
func NewRootCmd ¶
func StartUpdateCheck ¶
StartUpdateCheck primes the in-process cache from disk and, if the cached answer is stale (or absent), spawns a background goroutine that hits the GitHub Releases API. The goroutine writes to the cache file so a slow first run still benefits a fast second run. Call WaitForUpdateCheck before MaybePrintUpdateNudge in main, so a freshly fetched result has a chance to land before we decide whether to nudge.
Skips entirely when:
- the running subcommand is `upgrade` (does its own check),
- stderr isn't a TTY (piped output, CI),
- NORCUBE_NO_UPDATE_CHECK is set,
- the binary was built without -ldflags (Version == "dev").
func WaitForUpdateCheck ¶
func WaitForUpdateCheck()
WaitForUpdateCheck blocks for up to updateCheckWaitBudget if a background check is in flight. No-op when StartUpdateCheck didn't launch one (cache was fresh, or the check was skipped).
Types ¶
This section is empty.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package backup implements the `norcube backup ...` command tree (snapdb is the backend service behind the Norcube Backup product).
|
Package backup implements the `norcube backup ...` command tree (snapdb is the backend service behind the Norcube Backup product). |
|
Package langsync implements the `norcube langsync ...` command tree.
|
Package langsync implements the `norcube langsync ...` command tree. |
|
projectcfg
Package projectcfg loads and writes the per-project Langsync config (`.langsync.json`).
|
Package projectcfg loads and writes the per-project Langsync config (`.langsync.json`). |
|
projectcfg/translations
Package translations reads and writes language files for the sync command.
|
Package translations reads and writes language files for the sync command. |