diff --git a/cmd/drone-server/drone.go b/cmd/drone-server/drone.go index 159e80de7..e0893e2ce 100644 --- a/cmd/drone-server/drone.go +++ b/cmd/drone-server/drone.go @@ -34,14 +34,13 @@ var ( ) var ( - conf = flag.String("config", "drone.toml", "") debug = flag.Bool("debug", false, "") ) func main() { flag.Parse() - settings, err := config.Load(*conf) + settings, err := config.Load() if err != nil { panic(err) } @@ -55,6 +54,7 @@ func main() { if err != nil { panic(err) } + session := session.New(settings) eventbus_ := eventbus.New() queue_ := queue.New() diff --git a/pkg/config/config.go b/pkg/config/config.go index fbe55ca6e..4a89b11e5 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -93,20 +93,10 @@ type Config struct { } } -// Load loads the configuration file and reads -// parameters from environment variables. -func Load(path string) (*Config, error) { - return LoadBytes([]byte{}) -} - -// LoadBytes reads the configuration file and -// reads parameters from environment variables. -func LoadBytes(data []byte) (*Config, error) { +// Load loads the configuration from environment +// variables. +func Load() (*Config, error) { conf := &Config{} - // err := toml.Unmarshal(data, conf) - // if err != nil { - // return nil, err - // } err := envconfig.Init(conf) if err != nil { return nil, err