File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ func main() {
116
116
117
117
// Parse ini config
118
118
args , err := parseIni ("config.ini" )
119
- fmt .Println (args )
120
119
if err != nil {
121
120
panic (err )
122
121
}
@@ -130,7 +129,10 @@ func main() {
130
129
if err != nil {
131
130
panic (err )
132
131
}
133
- iniConf .Parse (args )
132
+ err = iniConf .Parse (args )
133
+ if err != nil {
134
+ panic (err )
135
+ }
134
136
135
137
// Instantiate Tools
136
138
usr , _ := user .Current ()
@@ -454,7 +456,6 @@ body {
454
456
455
457
func parseIni (filename string ) (args []string , err error ) {
456
458
cfg , err := ini .LoadSources (ini.LoadOptions {IgnoreInlineComment : false }, filename )
457
-
458
459
if err != nil {
459
460
return nil , err
460
461
}
@@ -467,6 +468,9 @@ func parseIni(filename string) (args []string, err error) {
467
468
} // Ignore configUpdateInterval
468
469
if key == "configUpdateInterval" {
469
470
continue
471
+ } // Ignore name
472
+ if key == "name" {
473
+ continue
470
474
}
471
475
args = append (args , "-" + key , val )
472
476
}
You can’t perform that action at this time.
0 commit comments