1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package config
import (
"github.com/tkanos/gonfig"
)
type Configuration struct {
DB_USERNAME string
DB_PASSWORD string
DB_PORT string
DB_HOST string
DB_NAME string
}
func GetConfig(fileName string) Configuration {
configuration := Configuration{}
gonfig.GetConf(fileName, &configuration)
return configuration
}
|