package main

import (
	"github.com/tscolari/docode/packages/docode"
	"github.com/tscolari/docode/packages/docodeconfig"

	"flag"
)

func main() {
	docodeFilePath := flag.String("config", "./DocodeFile", "ConfigFile to load")
	flag.Parse()

	fileConfig := docodeconfig.NewFromFile(*docodeFilePath)
	runner := docode.New(fileConfig)
	err := runner.Run()
	if err != nil {
		panic("ERROR: " + err.Error())
	}
}

package main

import (
	"github.com/tscolari/docode/packages/docode"
	"github.com/tscolari/docode/packages/docodeconfig"

	"flag"
)

func main() {
	docodeFilePath := flag.String("c", "./DocodeFile", "ConfigFile to load")
	argsConfig := fetchConfigFromArgs()

	flag.Parse()

	fileConfig := docodeconfig.NewFromFile(*docodeFilePath)
	config := docodeconfig.MergeConfigurations(argsConfig, fileConfig)
	runner := docode.New(config)
	err := runner.Run()
	if err != nil {
		panic("ERROR: " + err.Error())
	}
}

func fetchConfigFromArgs() docodeconfig.ArgsConfiguration {
	argsConfig := docodeconfig.ArgsConfiguration{}
	argsConfig.SSHKey = flag.String("k", "", "Ssh key path to use")

	return argsConfig
}

Add `-k` argument to set SSH-KEY on cli
Add `-k` argument to set SSH-KEY on cli

Also renames the `-config` argument to `-c`
