func someUpdate(l log.Logger, k *Kernel) error {
	l.Println("installing some update...")
	return nil
}
someUpdate is here to show that this method is only run once when starting the server.
package app
import (
	"context"
	"os"
	"path/filepath"
	"go-webapp-example/pkg/log"
	"github.com/pkg/errors"
	"github.com/romanyx/polluter"
)
const VersionParam = "update_version"
type Updater struct {
	k   *Kernel
	log log.Logger
	updates []updateFn
}
type updateFn func(log log.Logger, k *Kernel) error
func NewUpdater(k *Kernel) *Updater {
	u := &Updater{k: k, log: k.Log.WithPrefix("app.updater")}
	u.register()
	return u
}
func (u *Updater) register() {
	u.updates = []updateFn{
		seedBaseData,  
		someUpdate,  
		someOhterUpdate,  
	}
}
func seedBaseData(l log.Logger, k *Kernel) error {
	l.Println("seeding base data")
	seed, err := os.Open(filepath.Join(k.Config.Database.Migrations, "..", "seeds", "base.yml"))
	if err != nil {
		return errors.WithStack(err)
	}
	defer seed.Close()
	p := polluter.New(polluter.MySQLEngine(k.DB.Connection()))
	if err = p.Pollute(seed); err != nil {
		return errors.WithStack(err)
	}
	return nil
}