<commit_before>// @author Couchbase <<EMAIL>>
// @copyright 2014 Couchbase, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
	"flag"
	"github.com/couchbase/gometa/server"
	"log"
	"os"
)

//
// main function
//
func main() {

	var isClient string
	var isWatcher string
	var config string
	flag.StringVar(&isClient, "client", "false", "run as test client")
	flag.StringVar(&isWatcher, "watcher", "false", "run as watcher")
	flag.StringVar(&config, "config", "", "path for configuration file")
	flag.Parse()

	if isClient == "true" {
		runTestClient(config)
		os.Exit(0)
	}

	if isWatcher == "true" {
		runWatcher(config)
		os.Exit(0)
	}

	err := server.RunServer(config)
	if err != nil {
		log.Printf("Encounter Error = %s. Terminate server", err.Error())
		os.Exit(1)<commit_msg>Use BoolVar for isWatcher -client and -watcher flags.<commit_after>// @author Couchbase <<EMAIL>>
// @copyright 2014 Couchbase, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
	"flag"
	"github.com/couchbase/gometa/server"
	"log"
	"os"
)

//
// main function
//
func main() {
	var isClient bool
	var isWatcher bool
	var config string

	flag.BoolVar(&isClient, "client", false, "run as test client")
	flag.BoolVar(&isWatcher, "watcher", false, "run as watcher")
	flag.StringVar(&config, "config", "", "path for configuration file")
	flag.Parse()

	if isClient {
		runTestClient(config)
		os.Exit(0)
	}

	if isWatcher {
		runWatcher(config)
		os.Exit(0)
	}

	err := server.RunServer(config)
	if err != nil {
		log.Printf("Encounter Error = %s. Terminate server", err.Error())
		os.Exit(1)
{'fraction_non_alphanumeric': 0.12755488266464798, 'fraction_numerical': 0.008327024981074944, 'mean_word_length': 3.6613756613756614, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1632340', 'n_tokens_mistral': 855, 'n_tokens_neox': 824, 'n_words': 300}