mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
ghupdate: rename plugin struct
This commit is contained in:
@@ -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 == "" {
|
||||||
|
Reference in New Issue
Block a user