<commit_before>package main

import (
	"flag"
	"io/ioutil"
	"log"

	"github.com/coreos/coreos-cloudinit/cloudinit"
)

func main() {
	var userdata []byte
	var err error

	var file string
	flag.StringVar(&file, "from-file", "", "Read user-data from file rather than metadata service")

	var workspace string
	flag.StringVar(&workspace, "workspace", "/var/lib/coreos-cloudinit", "Base directory coreos-cloudinit should use to store data")

	flag.Parse()

	if file != "" {
		log.Printf("Reading user-data from file: %s", file)
		userdata, err = ioutil.ReadFile(file)
		if err != nil {
			log.Fatal(err.Error())
		}
	} else {<commit_msg>feat(version): Print binary version when given --version flag<commit_after>package main

import (
	"fmt"
	"flag"
	"io/ioutil"
	"os"
	"log"

	"github.com/coreos/coreos-cloudinit/cloudinit"
)

const version = "0.1.0+git"

func main() {
	var userdata []byte
	var err error

	var printVersion bool
	flag.BoolVar(&printVersion, "version", false, "Print the version and exit")

	var file string
	flag.StringVar(&file, "from-file", "", "Read user-data from file rather than metadata service")

	var workspace string
	flag.StringVar(&workspace, "workspace", "/var/lib/coreos-cloudinit", "Base directory coreos-cloudinit should use to store data")

	flag.Parse()

	if printVersion == true {
		fmt.Printf("coreos-cloudinit version %s\n", version)
		os.Exit(0)
	}

	if file != "" {
		log.Printf("Reading user-data from file: %s", file)
		userdata, err = ioutil.ReadFile(file)
		if err != nil {
			log.Fatal(err.Error())
		}
	} else {
{'fraction_non_alphanumeric': 0.14414414414414414, 'fraction_numerical': 0.002574002574002574, 'mean_word_length': 4.115131578947368, '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': '1504821', 'n_tokens_mistral': 572, 'n_tokens_neox': 544, 'n_words': 149}