// NewConfig creates a new config.
NewConfig creates a new config.
// NewConfig creates a new config .
func NewConfig() *Config {
	cfg := &Config{}
	cfg.FlagSet = flag.NewFlagSet("diff", flag.ContinueOnError)
	fs := cfg.FlagSet
	fs.StringVar(&cfg.ConfigFile, "config", "", "Config file")
	fs.StringVar(&cfg.LogLevel, "L", "info", "log level: debug, info, warn, error, fatal")
	fs.IntVar(&cfg.ChunkSize, "chunk-size", 1000, "diff check chunk size")
	fs.IntVar(&cfg.Sample, "sample", 100, "the percent of sampling check")
	fs.IntVar(&cfg.CheckThreadCount, "check-thread-count", 1, "how many goroutines are created to check data")
	fs.BoolVar(&cfg.UseRowID, "use-rowid", false, "set true if target-db and source-db all support tidb implicit column _tidb_rowid")
	fs.StringVar(&cfg.FixSQLFile, "fix-sql-file", "fix.sql", "the name of the file which saves sqls used to fix different data")
	fs.StringVar(&cfg.SourceSnapshot, "source-snapshot", "", "source database's snapshot config")
	fs.StringVar(&cfg.TargetSnapshot, "target-snapshot", "", "target database's snapshot config")
	fs.BoolVar(&cfg.PrintVersion, "V", false, "print version of sync_diff_inspector")
	return cfg
}
func NewConfig ( ) * Config { cfg := & Config { } cfg . FlagSet = flag . NewFlagSet ( " " , flag . ContinueOnError ) fs := cfg . FlagSet fs . StringVar ( & cfg . ConfigFile , " " , " " , " " ) fs . StringVar ( & cfg . LogLevel , " " , " " , " " ) fs . IntVar ( & cfg . ChunkSize , " " , 1000 , " " ) fs . IntVar ( & cfg . Sample , " " , 100 , " " ) fs . IntVar ( & cfg . CheckThreadCount , " " , 1 , " " ) fs . BoolVar ( & cfg . UseRowID , " " , false , " " ) fs . StringVar ( & cfg . FixSQLFile , " " , " " , " " ) fs . StringVar ( & cfg . SourceSnapshot , " " , " " , " " ) fs . StringVar ( & cfg . TargetSnapshot , " " , " " , " " ) fs . BoolVar ( & cfg . PrintVersion , " " , false , " " ) return cfg }
NewConfig creates a new config.
NewConfig creates a new config .