<commit_before>package main

import (
    "fmt"
    "os"
    "os/user"
)

func main() {
    usr, err := user.Current()

    if err != nil {
        fmt.Println(err)
        os.Exit(1)
    }

    fmt.Println(usr.Username)
}<commit_msg>logname: added help and version<commit_after>package main

import (
	"code.google.com/p/opts-go"
	"fmt"
	"os"
	"os/user"
)

const (
	version = `logname (go coreutils) 0.1
Packaged by <NAME>
Copyright (c) 2014 <NAME>
License MIT: <http://opensource.org/licenses/MIT>
This is free software: you are free to change and redistribute it
There is NO WARRANTY, to the extent permitted by law.

Written by <NAME>`

	usage = `Usage: logname [OPTION]
Print the name of the current user.

      --help     display this help and exit
      --version  output version information and exit`
)

func main() {
	opts.Usage = usage
	showHelp := opts.Flag("", "--help", "Help")
	showVersion := opts.Flag("", "--version", "Version")

	opts.Parse()

	if *showHelp {
		fmt.Print(usage)
		os.Exit(0)
	}

	if *showVersion {
		fmt.Print(version)
		os.Exit(0)
	}

	usr, err := user.Current()

	if err != nil {
		fmt.Print(err)
		os.Exit(1)
	}

	fmt.Print(usr.Username)
}
{'fraction_non_alphanumeric': 0.14613423959218352, 'fraction_numerical': 0.008496176720475786, 'mean_word_length': 2.97972972972973, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4403305', 'n_tokens_mistral': 448, 'n_tokens_neox': 423, 'n_words': 122}