func GetAbsoluteDirPathOfConfigFile() (string, error) {
	oneBuildConfigFile := getConfigFile()
	abs, err := filepath.Abs(oneBuildConfigFile)
	if err != nil {
		return "", errors.New("error in resolving file path for '" + oneBuildConfigFile + "' configuration file.")
	}
	baseDirFromAbs := filepath.Dir(abs)
	return baseDirFromAbs, nil
}
GetAbsoluteDirPathOfConfigFile gets the base directory from the configuration file location
package config
import (
	"errors"
	"io/ioutil"
	"os"
	"path/filepath"
	"github.com/spf13/viper"
	"gopkg.in/yaml.v3"
)
func ReadFile() (string, error) {
	oneBuildConfigFile := getConfigFile()
	if _, err := os.Stat(oneBuildConfigFile); os.IsNotExist(err) {
		return "", errors.New("no '" + oneBuildConfigFile + "' file found")
	}
	yamlFile, err := ioutil.ReadFile(oneBuildConfigFile)
	if err != nil {
		return "", errors.New("error in reading '" + oneBuildConfigFile + "' configuration file")
	}
	return string(yamlFile), nil
}
func IsConfigFilePresent() bool {
	oneBuildConfigFile := getConfigFile()
	if _, err := os.Stat(oneBuildConfigFile); err == nil {
		return true
	} else if os.IsNotExist(err) {
		return false
	}
	return false
}
func WriteConfigFile(configuration OneBuildConfiguration) error {
	oneBuildConfigFile := getConfigFile()
	yamlData, _ := yaml.Marshal(&configuration)
	content := string(yamlData)
	return ioutil.WriteFile(oneBuildConfigFile, []byte(content), 0750)
}
func DeleteConfigFile() error {
	oneBuildConfigFile := getConfigFile()
	return os.Remove(oneBuildConfigFile)
}