<commit_before>package main

import (
	"flag"
	"fmt"
	"os"

	"github.com/Cepave/query/g"
	"github.com/Cepave/query/graph"
	"github.com/Cepave/query/grpc"
	"github.com/Cepave/query/http"
	"github.com/Cepave/query/proc"
)

func main() {
	cfg := flag.String("c", "cfg.json", "specify config file")
	version := flag.Bool("v", false, "show version")
	versionGit := flag.Bool("vg", false, "show version and git commit log")
	flag.Parse()

	if *version {
		fmt.Println(g.VERSION)
		os.Exit(0)
	}
	if *versionGit {
		fmt.Println(g.VERSION, g.COMMIT)
		os.Exit(0)
	}

	// config
	g.ParseConfig(*cfg)
	// proc
	proc.Start()

	// graph
	graph.Start()

	// http
	http.Start()

	// grpc
	go grpc.Start()

	select {}
}<commit_msg>add gin server init in main.go<commit_after>package main

import (
	"flag"
	"fmt"
	"os"

	"github.com/Cepave/query/conf"
	"github.com/Cepave/query/database"
	"github.com/Cepave/query/g"
	ginHttp "github.com/Cepave/query/gin_http"
	"github.com/Cepave/query/graph"
	"github.com/Cepave/query/grpc"
	"github.com/Cepave/query/http"
	"github.com/Cepave/query/proc"
)

func main() {
	cfg := flag.String("c", "cfg.json", "specify config file")
	version := flag.Bool("v", false, "show version")
	versionGit := flag.Bool("vg", false, "show version and git commit log")
	flag.Parse()

	if *version {
		fmt.Println(g.VERSION)
		os.Exit(0)
	}
	if *versionGit {
		fmt.Println(g.VERSION, g.COMMIT)
		os.Exit(0)
	}

	// config
	g.ParseConfig(*cfg)
	// proc
	proc.Start()

	// graph
	graph.Start()

	// http
	http.Start()

	// grpc
	go grpc.Start()

	//lambdaSetup
	database.Init()
	conf.ReadConf("./conf/lambdaSetup.json")
	go ginHttp.StartWeb()
	select {}
}
{'fraction_non_alphanumeric': 0.18335343787696018, 'fraction_numerical': 0.0024125452352231603, 'mean_word_length': 3.5081521739130435, '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': '3410431', 'n_tokens_mistral': 722, 'n_tokens_neox': 692, 'n_words': 124}