func readFromFS(sourcePath string) (string, error) {

	// If sourcePath starts with ~ we search for $HOME
	// and preppend it to the absolutePath overwriting the first character
	// TODO: Add Windows support
	if strings.HasPrefix(sourcePath, "~") {
		homeDir := os.Getenv("HOME")
		if homeDir == "" {
			return "", fmt.Errorf("Could not find $HOME")
		}
		sourcePath = filepath.Join(homeDir, sourcePath[1:])
	}

	bytes, err := ioutil.ReadFile(sourcePath)
	if err != nil {
		return "", err
	}
	return string(bytes), nil
}
func readFromFS(sourcePath string) (string, error) {

	
	
	
	if strings.HasPrefix(sourcePath, "~") {
		homeDir := os.Getenv("HOME")
		if homeDir == "" {
			return "", fmt.Errorf("Could not find $HOME")
		}
		sourcePath = filepath.Join(homeDir, sourcePath[1:])
	}

	bytes, err := ioutil.ReadFile(sourcePath)
	if err != nil {
		return "", err
	}
	return string(bytes), nil
}
func readFromFS ( sourcePath string ) ( string , error ) { // If sourcePath starts with ~ we search for $HOME // and preppend it to the absolutePath overwriting the first character // TODO: Add Windows support if strings . HasPrefix ( sourcePath , " " ) { homeDir := os . Getenv ( " " ) if homeDir == " " { return " " , fmt . Errorf ( " " ) } sourcePath = filepath . Join ( homeDir , sourcePath [ 1 : ] ) } bytes , err := ioutil . ReadFile ( sourcePath ) if err != nil { return " " , err } return string ( bytes ) , nil }
// readFromFS reads file from a local path and returns as string
readFromFS reads file from a local path and returns as string