Documentation
¶
Index ¶
Constants ¶
View Source
const CurrentHookVersion = 2
CurrentHookVersion is the latest hook script version. Increment this when the hook script changes in a breaking way.
View Source
const WarnIntervalSecs = 24 * 3600
WarnIntervalSecs is how often to warn about outdated hooks (24 hours).
Variables ¶
This section is empty.
Functions ¶
func ParseHookVersion ¶
ParseHookVersion extracts the version number from hook script content. Looks for "# tokman-hook-version: N" in the first 5 lines.
Types ¶
type VersionChecker ¶
type VersionChecker struct {
// contains filtered or unexported fields
}
VersionChecker handles hook version checking.
func NewVersionChecker ¶
func NewVersionChecker() *VersionChecker
NewVersionChecker creates a new version checker.
func (*VersionChecker) MaybeWarn ¶
func (v *VersionChecker) MaybeWarn()
MaybeWarn checks if the installed hook is outdated and warns once per day. This is non-blocking and fails silently on errors.
Click to show internal directories.
Click to hide internal directories.