<commit_before>package main

import (
	"fmt"
	"io/ioutil"

	"github.com/golang/glog"
	yaml "gopkg.in/yaml.v1"
)

type InventoryGroup struct {
	Name     string   `yaml:"group"`
	Hosts    []string `yaml:"hosts,omitempty"`
	Children []string `yaml:"children,omitempty"`
}

func (g InventoryGroup) Check() error {
	// Make sure there are either hosts, or child groups specified.
	if len(g.Hosts) == 0 && len(g.Children) == 0 {
		return fmt.Errorf("no hosts or child groups specified in group")
	}
	return nil
}

func LoadInventoryFile(pth string) ([]InventoryGroup, error) {
	b, err := ioutil.ReadFile(pth)
	if err != nil {
		return nil, err
	}

	glog.V(4).Infof("Read %d bytes from %s", len(b), pth)

	var inv []InventoryGroup
	err = yaml.Unmarshal(b, &inv)
	if err != nil {
		return nil, err
	}

	return inv, err
}<commit_msg>Removed all use of golang/glog.<commit_after>package main

import (
	"fmt"
	"io/ioutil"

	yaml "gopkg.in/yaml.v1"
)

type InventoryGroup struct {
	Name     string   `yaml:"group"`
	Hosts    []string `yaml:"hosts,omitempty"`
	Children []string `yaml:"children,omitempty"`
}

func (g InventoryGroup) Check() error {
	// Make sure there are either hosts, or child groups specified.
	if len(g.Hosts) == 0 && len(g.Children) == 0 {
		return fmt.Errorf("no hosts or child groups specified in group")
	}
	return nil
}

func LoadInventoryFile(pth string) ([]InventoryGroup, error) {
	b, err := ioutil.ReadFile(pth)
	if err != nil {
		return nil, err
	}

	var inv []InventoryGroup
	err = yaml.Unmarshal(b, &inv)
	if err != nil {
		return nil, err
	}

	return inv, err
}
{'fraction_non_alphanumeric': 0.1407828282828283, 'fraction_numerical': 0.004419191919191919, 'mean_word_length': 3.8470948012232418, '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': '7266215', 'n_tokens_mistral': 604, 'n_tokens_neox': 573, 'n_words': 170}