packageの書き忘れを修正
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
import "gopkg.in/ini.v1"
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
|
||||||
DB struct {
|
DB struct {
|
||||||
Type string `ini:"DBTYPE"`
|
Type string `ini:"DBTYPE"`
|
||||||
Host string `ini:"DBHOST"`
|
Host string `ini:"DBHOST"`
|
||||||
@@ -26,8 +31,6 @@ type Config struct {
|
|||||||
} `ini:"security"`
|
} `ini:"security"`
|
||||||
}
|
}
|
||||||
|
|
||||||
import "gopkg.in/ini.v1"
|
|
||||||
|
|
||||||
func LoadConfig(filePath string) (*Config, error) {
|
func LoadConfig(filePath string) (*Config, error) {
|
||||||
cfg, err := ini.Load(filePath)
|
cfg, err := ini.Load(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user