func ERFormat(erFormat string) Option {
	return func(c *Config) error {
		if erFormat != "" {
			c.ER.Format = erFormat
		}
		return nil
	}
}
ERFormat return Option set Config.ER.Format
package config
import (
	"fmt"
	"net/url"
	"os"
	"path/filepath"
	"strings"
	"github.com/aquasecurity/go-version/pkg/version"
	"github.com/goccy/go-yaml"
	"github.com/k1LoW/expand"
	"github.com/k1LoW/tbls/dict"
	"github.com/k1LoW/tbls/schema"
	ver "github.com/k1LoW/tbls/version"
	"github.com/minio/pkg/wildcard"
	"github.com/pkg/errors"
)
const DefaultDocPath = "dbdoc"
var DefaultConfigFilePaths = []string{".tbls.yml", "tbls.yml"}
const DefaultERFormat = "svg"
var DefaultDistance = 1
type Config struct {
	Name                   string                 `yaml:"name"`
	Desc                   string                 `yaml:"desc,omitempty"`
	Labels                 []string               `yaml:"labels,omitempty"`
	DSN                    DSN                    `yaml:"dsn"`
	DocPath                string                 `yaml:"docPath"`
	Format                 Format                 `yaml:"format,omitempty"`
	ER                     ER                     `yaml:"er,omitempty"`
	Include                []string               `yaml:"include,omitempty"`
	Exclude                []string               `yaml:"exclude,omitempty"`
	Lint                   Lint                   `yaml:"lint,omitempty"`
	LintExclude            []string               `yaml:"lintExclude,omitempty"`
	Relations              []AdditionalRelation   `yaml:"relations,omitempty"`
	Comments               []AdditionalComment    `yaml:"comments,omitempty"`
	Dict                   dict.Dict              `yaml:"dict,omitempty"`
	Templates              Templates              `yaml:"templates,omitempty"`
	DetectVirtualRelations DetectVirtualRelations `yaml:"detectVirtualRelations,omitempty"`
	BaseUrl                string                 `yaml:"baseUrl,omitempty"`
	RequiredVersion        string                 `yaml:"requiredVersion,omitempty"`
	MergedDict             dict.Dict              `yaml:"-"`
	Path                   string                 `yaml:"-"`
	root                   string                 `yaml:"-"`
}
type DSN struct {
	URL     string            `yaml:"url"`
	Headers map[string]string `yaml:"headers,omitempty"`
}
type Format struct {
	Adjust bool `yaml:"adjust,omitempty"`
	Sort   bool `yaml:"sort,omitempty"`
	Number bool `yaml:"number,omitempty"`
}
type ER struct {
	Skip     bool   `yaml:"skip,omitempty"`
	Format   string `yaml:"format,omitempty"`
	Comment  bool   `yaml:"comment,omitempty"`
	Distance *int   `yaml:"distance,omitempty"`
	Font     string `yaml:"font,omitempty"`
}
type AdditionalRelation struct {
	Table         string   `yaml:"table"`
	Columns       []string `yaml:"columns"`
	ParentTable   string   `yaml:"parentTable"`
	ParentColumns []string `yaml:"parentColumns"`
	Def           string   `yaml:"def,omitempty"`
}
type AdditionalComment struct {
	Table              string            `yaml:"table"`
	TableComment       string            `yaml:"tableComment,omitempty"`
	ColumnComments     map[string]string `yaml:"columnComments,omitempty"`
	IndexComments      map[string]string `yaml:"indexComments,omitempty"`
	ConstraintComments map[string]string `yaml:"constraintComments,omitempty"`
	TriggerComments    map[string]string `yaml:"triggerComments,omitempty"`
	Labels             []string          `yaml:"labels,omitempty"`
}
type DetectVirtualRelations struct {
	Enabled  bool   `yaml:"enabled,omitempty"`
	Strategy string `yaml:"strategy,omitempty"`
}
type Option func(*Config) error
func DSNURL(dsn string) Option {
	return func(c *Config) error {
		c.DSN.URL = dsn
		return nil
	}
}
func DocPath(docPath string) Option {
	return func(c *Config) error {
		c.DocPath = docPath
		return nil
	}
}
func Adjust(adjust bool) Option {
	return func(c *Config) error {
		if adjust {
			c.Format.Adjust = adjust
		}
		return nil
	}
}
func Sort(sort bool) Option {
	return func(c *Config) error {
		if sort {
			c.Format.Sort = sort
		}
		return nil
	}
}
func ERSkip(skip bool) Option {
	return func(c *Config) error {
		c.ER.Skip = skip
		return nil
	}
}