<commit_before>package model

import (
	"io/ioutil"
	"os"

	"github.com/jakubknejzlik/kontena-git-cli/utils"

	yaml2 "gopkg.in/yaml.v2"
)

// KontenaSecret ...
type KontenaSecret struct {
	Secret string `yaml:"secret,omitempty"`
	Name   string `yaml:"name,omitempty"`
	Type   string `yaml:"type,omitempty"`
}

// KontenaDeploy ...
type KontenaDeploy struct {
	Strategy string `yaml:"strategy,omitempty"`
}

// KontenaService ...
type KontenaService struct {
	Instances *int   `yaml:"instances,omitempty"`
	Image     string `yaml:"image,omitempty"`
	Command   string `yaml:"command,omitempty"`
	// Entrypoint    string            `yaml:"entrypoint,omitempty"`
	Volumes     []string              `yaml:"volumes,omitempty"`
	Labels      map[string]string     `yaml:"labels,omitempty"`
	Environment []string              `yaml:"environment,omitempty"`
	Links       []string              `yaml:"links,omitempty"`
	Ports       []string              `yaml:"ports,omitempty"`
	Secrets     []KontenaSecret       `yaml:"secrets,omitempty"`
	Deploy      KontenaDeploy         `yaml:"deploy,omitempty"`
	Logging     KontenaServiceLogging `yaml:"logging,omitempty"`
}

// KontenaServiceLogging ...
type KontenaServiceLogging struct {
	Driver  string            `yaml:"driver,omitempty"`
	Options map[string]string `yaml:"options,omitempty"`
}

// KontenaStack ...
type KontenaStack struct {
	Name     string                    `yaml:"stack,omitempty"`
	Version  string                    `yaml:"version,omitempty"`
	Services map[string]KontenaService `yaml:"services,omitempty"`
}

// KontenaLoad ...
func KontenaLoad(path string) (KontenaStack, error) {
	var dc KontenaStack
	data, err := ioutil.ReadFile(path)
<commit_msg>Remove omitempty from service configuration<commit_after>package model

import (
	"io/ioutil"
	"os"

	"github.com/jakubknejzlik/kontena-git-cli/utils"

	yaml2 "gopkg.in/yaml.v2"
)

// KontenaSecret ...
type KontenaSecret struct {
	Secret string `yaml:"secret,omitempty"`
	Name   string `yaml:"name,omitempty"`
	Type   string `yaml:"type,omitempty"`
}

// KontenaDeploy ...
type KontenaDeploy struct {
	Strategy string `yaml:"strategy,omitempty"`
}

// KontenaService ...
type KontenaService struct {
	Instances *int   `yaml:"instances,omitempty"`
	Image     string `yaml:"image,omitempty"`
	Command   string `yaml:"command,omitempty"`
	// Entrypoint    string            `yaml:"entrypoint,omitempty"`
	Volumes     []string              `yaml:"volumes"`
	Labels      map[string]string     `yaml:"labels"`
	Environment []string              `yaml:"environment"`
	Links       []string              `yaml:"links"`
	Ports       []string              `yaml:"ports"`
	Secrets     []KontenaSecret       `yaml:"secrets"`
	Deploy      KontenaDeploy         `yaml:"deploy,omitempty"`
	Logging     KontenaServiceLogging `yaml:"logging,omitempty"`
}

// KontenaServiceLogging ...
type KontenaServiceLogging struct {
	Driver  string            `yaml:"driver,omitempty"`
	Options map[string]string `yaml:"options,omitempty"`
}

// KontenaStack ...
type KontenaStack struct {
	Name     string                    `yaml:"stack,omitempty"`
	Version  string                    `yaml:"version,omitempty"`
	Services map[string]KontenaService `yaml:"services,omitempty"`
}

// KontenaLoad ...
func KontenaLoad(path string) (KontenaStack, error) {
	var dc KontenaStack
	data, err := ioutil.ReadFile(path)

{'fraction_non_alphanumeric': 0.12794811320754718, 'fraction_numerical': 0.0011792452830188679, 'mean_word_length': 3.278688524590164, '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': '1950872', 'n_tokens_mistral': 1024, 'n_tokens_neox': 1037, 'n_words': 210}