package utils

import (
	"os"
	"path/filepath"
)

func GetPath(flag int) string {
	//basedir, _ := filepath.Abs(filepath.Dir(os.Args[0]))
	basedir, _ := os.Getwd()
	switch flag {
	case 0:
		return basedir + string(filepath.Separator) + "conf" + string(filepath.Separator)
	case 1:
		return basedir + string(filepath.Separator) + "dev" + string(filepath.Separator)
	case 2:
		return basedir + string(filepath.Separator) + "model" + string(filepath.Separator)
	case 3:
		return basedir + string(filepath.Separator) + "log" + string(filepath.Separator)
	case 4:
		return basedir + string(filepath.Separator) + "tmp" + string(filepath.Separator)
	case 5:
		return basedir + string(filepath.Separator) + "pole" + string(filepath.Separator)
	case 6:
		return basedir + string(filepath.Separator) + "rule" + string(filepath.Separator)
	}
	return ""
}
