removed un-necessary config database code now that it is file-driven
This commit is contained in:
parent
73060a463c
commit
7a737a5fbb
1 changed files with 0 additions and 37 deletions
|
@ -1,37 +0,0 @@
|
||||||
package database
|
|
||||||
|
|
||||||
/*
|
|
||||||
import (
|
|
||||||
"github.com/BurntSushi/toml"
|
|
||||||
"github.com/drone/drone/shared/model"
|
|
||||||
)
|
|
||||||
|
|
||||||
type ConfigManager interface {
|
|
||||||
Find() *model.Config
|
|
||||||
}
|
|
||||||
|
|
||||||
// configManager manages configuration data from a
|
|
||||||
// configuration file using .toml format
|
|
||||||
type configManager struct {
|
|
||||||
conf *model.Config
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewConfigManager initiales a new CommitManager intended to
|
|
||||||
// manage and persist commits.
|
|
||||||
func NewConfigManager(filename string) ConfigManager {
|
|
||||||
c := configManager{}
|
|
||||||
c.conf = &model.Config{}
|
|
||||||
|
|
||||||
// load the configuration file and parse
|
|
||||||
_, err := toml.DecodeFile(filename, c.conf)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return &c
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *configManager) Find() *model.Config {
|
|
||||||
return c.conf
|
|
||||||
}
|
|
||||||
*/
|
|
Loading…
Reference in a new issue