ghupdate: rename plugin struct

This commit is contained in:
henrygd
2025-08-26 18:41:42 -04:00
parent e49bfaf5d7
commit 4815cd29bc

View File

@@ -66,8 +66,13 @@ type Config struct {
DataDir string DataDir string
} }
type updater struct {
config Config
currentVersion string
}
func Update(config Config) (updated bool, err error) { func Update(config Config) (updated bool, err error) {
p := &plugin{ p := &updater{
currentVersion: beszel.Version, currentVersion: beszel.Version,
config: config, config: config,
} }
@@ -75,12 +80,7 @@ func Update(config Config) (updated bool, err error) {
return p.update() return p.update()
} }
type plugin struct { func (p *updater) update() (updated bool, err error) {
config Config
currentVersion string
}
func (p *plugin) update() (updated bool, err error) {
ColorPrint(ColorYellow, "Fetching release information...") ColorPrint(ColorYellow, "Fetching release information...")
if p.config.DataDir == "" { if p.config.DataDir == "" {