<commit_before>package main

import (
	"bufio"
	"flag"
	"fmt"
	"os"
	"strings"

	"golang.org/x/net/context"
)

var VERSION = "v0.0.1"

func main() {
	host := flag.String("host", "", "address of memcached server")
	version := flag.Bool("v", false, "show version")
	flag.Parse()

	if *version {
		cprintln(VERSION, COLOR_NONE)
		os.Exit(0)
	}

	if *host == "" {
		*host = "127.0.0.1:11211"
	}

	MemcacheInit(*host)

	// handle commands
	ctx, done := context.WithCancel(context.Background())
	go func() {
		cprintln("==============================", COLOR_GREEN)
		cprintln("memcache client "+VERSION, COLOR_GREEN)
		cprintln("==============================", COLOR_GREEN)
		running := true
		reader := bufio.NewReader(os.Stdin)
	Shell:
		for running {
			cprint("MC>> ", COLOR_GREEN)
			data, _, _ := reader.ReadLine()
			data_lower := strings.ToLower(string(data))
			cmd := strings.Split(data_lower, " ")
			if len(cmd) == 0 || cmd[0] == "" {
				continue
			}

			switch cmd[0] {
			case "bye":
				fallthrough
			case "exit":
				fallthrough
			case "e":
				fallthrough<commit_msg>fix bug, just cmd[0] need change to lower<commit_after>package main

import (
	"bufio"
	"flag"
	"fmt"
	"os"
	"strings"

	"golang.org/x/net/context"
)

var VERSION = "v0.0.1"

func main() {
	host := flag.String("host", "", "address of memcached server")
	version := flag.Bool("v", false, "show version")
	flag.Parse()

	if *version {
		cprintln(VERSION, COLOR_NONE)
		os.Exit(0)
	}

	if *host == "" {
		*host = "127.0.0.1:11211"
	}

	MemcacheInit(*host)

	// handle commands
	ctx, done := context.WithCancel(context.Background())
	go func() {
		cprintln("==============================", COLOR_GREEN)
		cprintln("memcache client "+VERSION, COLOR_GREEN)
		cprintln("==============================", COLOR_GREEN)
		running := true
		reader := bufio.NewReader(os.Stdin)
	Shell:
		for running {
			cprint("MC>> ", COLOR_GREEN)
			data, _, _ := reader.ReadLine()
			cmd := strings.Split(string(data), " ")
			if len(cmd) == 0 || cmd[0] == "" {
				continue
			}

			switch strings.ToLower(cmd[0]) {
			case "bye":
				fallthrough
			case "exit":
				fallthrough
			case "e":
				fallthrough
{'fraction_non_alphanumeric': 0.22001845018450183, 'fraction_numerical': 0.017066420664206643, 'mean_word_length': 3.715217391304348, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2378200', 'n_tokens_mistral': 906, 'n_tokens_neox': 791, 'n_words': 168}