go: add a setting val for whether db is set up
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b1ab686493
commit
f1bb52c58f
@ -16,6 +16,7 @@ type Settings struct {
|
|||||||
assetsPath string
|
assetsPath string
|
||||||
templatesPath string
|
templatesPath string
|
||||||
version string
|
version string
|
||||||
|
dbIsSetUp bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// New returns a new instance of the settings struct.
|
// New returns a new instance of the settings struct.
|
||||||
@ -119,6 +120,11 @@ func (s *Settings) Version() string {
|
|||||||
return s.version
|
return s.version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DbIsSetUp returns the dbIsSetUp.
|
||||||
|
func (s *Settings) DbIsSetUp() bool {
|
||||||
|
return s.dbIsSetUp
|
||||||
|
}
|
||||||
|
|
||||||
// SetHost sets the host.
|
// SetHost sets the host.
|
||||||
func (s *Settings) SetHost(host string) {
|
func (s *Settings) SetHost(host string) {
|
||||||
s.host = host
|
s.host = host
|
||||||
@ -168,3 +174,8 @@ func (s *Settings) SetTemplatesPath(templatesPath string) {
|
|||||||
func (s *Settings) SetVersion(version string) {
|
func (s *Settings) SetVersion(version string) {
|
||||||
s.version = version
|
s.version = version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetDbIsSetUp sets the dbIsSetUp.
|
||||||
|
func (s *Settings) SetDbIsSetUp(is bool) {
|
||||||
|
s.dbIsSetUp = is
|
||||||
|
}
|
||||||
|
2
run.go
2
run.go
@ -118,6 +118,8 @@ func run() error {
|
|||||||
|
|
||||||
setting := settings.New()
|
setting := settings.New()
|
||||||
|
|
||||||
|
setting.SetDbIsSetUp(true)
|
||||||
|
|
||||||
setting.Consolidate(
|
setting.Consolidate(
|
||||||
conf, host, port, devel, version,
|
conf, host, port, devel, version,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user