@@ -55,12 +55,12 @@ const (
5555)
5656
5757type Config struct {
58- Version string `json:"version" yaml:"version"`
59- Cloud Cloud `json:"cloud" yaml:"cloud"`
60- SQL []SQL `json:"sql" yaml:"sql"`
61- Gen Gen `json:"overrides,omitempty" yaml:"overrides"`
62- Plugins []Plugin `json:"plugins" yaml:"plugins"`
63- Rules []Rule `json:"rules" yaml:"rules"`
58+ Version string `json:"version" yaml:"version"`
59+ Cloud Cloud `json:"cloud" yaml:"cloud"`
60+ SQL []SQL `json:"sql" yaml:"sql"`
61+ Overrides Overrides `json:"overrides,omitempty" yaml:"overrides"`
62+ Plugins []Plugin `json:"plugins" yaml:"plugins"`
63+ Rules []Rule `json:"rules" yaml:"rules"`
6464}
6565
6666type Database struct {
@@ -93,11 +93,11 @@ type Rule struct {
9393 Msg string `json:"message" yaml:"message"`
9494}
9595
96- type Gen struct {
97- Go * GenGo `json:"go,omitempty" yaml:"go"`
96+ type Overrides struct {
97+ Go * GoOverrides `json:"go,omitempty" yaml:"go"`
9898}
9999
100- type GenGo struct {
100+ type GoOverrides struct {
101101 Overrides []Override `json:"overrides,omitempty" yaml:"overrides"`
102102 Rename map [string ]string `json:"rename,omitempty" yaml:"rename"`
103103}
@@ -258,11 +258,11 @@ func Combine(conf Config, pkg SQL) CombinedSettings {
258258 Package : pkg ,
259259 Rename : map [string ]string {},
260260 }
261- if conf .Gen .Go != nil {
262- for k , v := range conf .Gen .Go .Rename {
261+ if conf .Overrides .Go != nil {
262+ for k , v := range conf .Overrides .Go .Rename {
263263 cs .Rename [k ] = v
264264 }
265- cs .Overrides = append (cs .Overrides , conf .Gen .Go .Overrides ... )
265+ cs .Overrides = append (cs .Overrides , conf .Overrides .Go .Overrides ... )
266266 }
267267 if pkg .Gen .Go != nil {
268268 cs .Go = * pkg .Gen .Go
0 commit comments