30 lines
440 B
Go
30 lines
440 B
Go
|
package conf
|
||
|
|
||
|
import "sync"
|
||
|
|
||
|
// declare the flag to use for each variable
|
||
|
var map_arguments = map[string]string {
|
||
|
"LokiURL" : "u",
|
||
|
"ArgoFile": "f",
|
||
|
"ContainerName" : "n",
|
||
|
}
|
||
|
|
||
|
type Config struct {
|
||
|
LokiURL string
|
||
|
ArgoFile string
|
||
|
ContainerName string
|
||
|
}
|
||
|
|
||
|
var instance *Config
|
||
|
var once sync.Once
|
||
|
|
||
|
func GetConfig() *Config {
|
||
|
once.Do(func() {
|
||
|
instance = &Config{}
|
||
|
})
|
||
|
return instance
|
||
|
}
|
||
|
|
||
|
func GetConfFromArgs(argument string){
|
||
|
|
||
|
}
|