mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-14 08:52:44 +00:00
22 lines
357 B
Go
22 lines
357 B
Go
|
// +build appengine
|
||
|
|
||
|
package main
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
"github.com/Luzifer/rconfig"
|
||
|
)
|
||
|
|
||
|
func loadConfig() *config {
|
||
|
cfg := &config{}
|
||
|
|
||
|
// Workaround as GAE supplies more parameters than expected.
|
||
|
// This removes all CLI flags for parsing and relies only on parsing
|
||
|
// environment variables.
|
||
|
os.Args = []string{os.Args[0]}
|
||
|
|
||
|
rconfig.Parse(cfg)
|
||
|
return cfg
|
||
|
}
|