<commit_before>package main

import (
	"flag"
	"fmt"
	"os"

	"github.com/fatih/color"
)

func main() {
	configurationType := flag.String("type", "deployment", "Kubernetes configuration type, eg: deployment, rc, secret")
	image := flag.String("image", "", "Docker image name")
	imageTag := flag.String("tag", "", "Docker image tag")
	filePath := flag.String("file-path", "", "Configuration file location")

	flag.Parse()

	err := checkRequiredFlags(*configurationType, *image, *imageTag, *filePath)
	if err != nil {
		color.Red("Error: %v", err)
		color.Black("--------------------")
		flag.PrintDefaults()<commit_msg>Add base logic to unmarshal a yaml<commit_after>package main

import (
	"flag"
	"fmt"
	"os"

	"io/ioutil"

	"github.com/fatih/color"
	"github.com/oshalygin/k8s-config/models"
	"gopkg.in/yaml.v2"
)

func main() {
	configurationFile := models.Deployment{}

	configurationType := flag.String("type", "deployment", "Kubernetes configuration type, eg: deployment, rc, secret")
	image := flag.String("image", "", "Docker image name")
	imageTag := flag.String("tag", "", "Docker image tag")
	filePath := flag.String("file-path", "", "Configuration file location")

	flag.Parse()

	file, err := ioutil.ReadFile("./test-files/deployment.yaml")
	if err != nil {
		color.Red("Error: %v", err)
		os.Exit(1)
	}

	err = yaml.Unmarshal(file, &configurationFile)
	if err != nil {
		color.Red("Error: %v", err)
		os.Exit(1)
	}

	err = checkRequiredFlags(*configurationType, *image, *imageTag, *filePath)
	if err != nil {
		color.Red("Error: %v", err)
		color.Black("--------------------")
		flag.PrintDefaults()
{'fraction_non_alphanumeric': 0.20235878336436997, 'fraction_numerical': 0.002482929857231533, 'mean_word_length': 4.166666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '267288', 'n_tokens_mistral': 576, 'n_tokens_neox': 548, 'n_words': 126}