|
@@ -12,10 +12,16 @@ func main() {
|
|
|
var cfg *ini.File
|
|
var cfg *ini.File
|
|
|
|
|
|
|
|
fmt.Println(len(os.Args))
|
|
fmt.Println(len(os.Args))
|
|
|
- if len(os.Args) > 1 && len(os.Args) < 3 {
|
|
|
|
|
|
|
+ if len(os.Args) > 1 && len(os.Args) < 4 {
|
|
|
fmt.Println("parametro passato",os.Args[1])
|
|
fmt.Println("parametro passato",os.Args[1])
|
|
|
inip.GetIni(os.Args[1])
|
|
inip.GetIni(os.Args[1])
|
|
|
- cfg = inip.LoadIni()
|
|
|
|
|
|
|
+ cfg = inip.LoadIni()
|
|
|
|
|
+
|
|
|
|
|
+ // sezione di prova per vedere cosa ritorna dal file
|
|
|
|
|
+ fmt.Println(inip.GetMySection())
|
|
|
|
|
+ mymail,err := cfg.GetSection("mail")
|
|
|
|
|
+
|
|
|
|
|
+ fmt.Println(mymail,err)
|
|
|
} else {
|
|
} else {
|
|
|
fmt.Println("parametro errato")
|
|
fmt.Println("parametro errato")
|
|
|
os.Exit(100)
|
|
os.Exit(100)
|