@@ -102,20 +102,20 @@ func getConfig(userCfgDir UserConfigDir, viper *viper.Viper) (*config.Config, er
102
102
return nil , err
103
103
}
104
104
105
- if cfg .Core .ServerTLSEnabled {
106
- if cfg .Core .ServerTLSCertFile == "" {
107
- cfg .Core .ServerTLSCertFile = filepath .Join (string (userCfgDir ), "cert.pem" )
105
+ if cfg .Kernel .ServerTLSEnabled {
106
+ if cfg .Kernel .ServerTLSCertFile == "" {
107
+ cfg .Kernel .ServerTLSCertFile = filepath .Join (string (userCfgDir ), "cert.pem" )
108
108
}
109
- if cfg .Core .ServerTLSKeyFile == "" {
110
- cfg .Core .ServerTLSKeyFile = filepath .Join (string (userCfgDir ), "key.pem" )
109
+ if cfg .Kernel .ServerTLSKeyFile == "" {
110
+ cfg .Kernel .ServerTLSKeyFile = filepath .Join (string (userCfgDir ), "key.pem" )
111
111
}
112
112
}
113
113
114
114
return cfg , nil
115
115
}
116
116
117
117
func getLogger (c * config.Config ) (* zap.Logger , error ) {
118
- if c == nil || ! c .Core .LogEnabled {
118
+ if c == nil || ! c .Kernel .LogEnabled {
119
119
return zap .NewNop (), nil
120
120
}
121
121
@@ -132,16 +132,16 @@ func getLogger(c *config.Config) (*zap.Logger, error) {
132
132
ErrorOutputPaths : []string {"stderr" },
133
133
}
134
134
135
- if c .Core .LogVerbose {
135
+ if c .Kernel .LogVerbose {
136
136
zapConfig .Level = zap .NewAtomicLevelAt (zap .DebugLevel )
137
137
zapConfig .Development = true
138
138
zapConfig .Encoding = "console"
139
139
zapConfig .EncoderConfig = zap .NewDevelopmentEncoderConfig ()
140
140
}
141
141
142
- if c .Core .LogPath != "" {
143
- zapConfig .OutputPaths = []string {c .Core .LogPath }
144
- zapConfig .ErrorOutputPaths = []string {c .Core .LogPath }
142
+ if c .Kernel .LogPath != "" {
143
+ zapConfig .OutputPaths = []string {c .Kernel .LogPath }
144
+ zapConfig .ErrorOutputPaths = []string {c .Kernel .LogPath }
145
145
}
146
146
147
147
l , err := zapConfig .Build ()
@@ -153,24 +153,24 @@ func getProject(c *config.Config, logger *zap.Logger) (*project.Project, error)
153
153
project .WithLogger (logger ),
154
154
}
155
155
156
- if c .Core .Filename != "" {
157
- return project .NewFileProject (c .Core .Filename , opts ... )
156
+ if c .Kernel .Filename != "" {
157
+ return project .NewFileProject (c .Kernel .Filename , opts ... )
158
158
}
159
159
160
- projDir := c .Core .ProjectDir
160
+ projDir := c .Kernel .ProjectDir
161
161
// If no project directory is specified, use the current directory.
162
162
if projDir == "" {
163
163
projDir = "."
164
164
}
165
165
166
166
opts = append (
167
167
opts ,
168
- project .WithIgnoreFilePatterns (c .Core .IgnorePaths ... ),
169
- project .WithRespectGitignore (! c .Core .DisableGitignore ),
170
- project .WithEnvFilesReadOrder (c .Core .EnvSourceFiles ),
168
+ project .WithIgnoreFilePatterns (c .Kernel .IgnorePaths ... ),
169
+ project .WithRespectGitignore (! c .Kernel .DisableGitignore ),
170
+ project .WithEnvFilesReadOrder (c .Kernel .EnvSourceFiles ),
171
171
)
172
172
173
- if c .Core .FindRepoUpward {
173
+ if c .Kernel .FindRepoUpward {
174
174
opts = append (opts , project .WithFindRepoUpward ())
175
175
}
176
176
@@ -228,7 +228,7 @@ func getProjectFilters(c *config.Config) ([]project.Filter, error) {
228
228
func getSession (cfg * config.Config , proj * project.Project ) (* command.Session , error ) {
229
229
sess := command .NewSession ()
230
230
231
- if cfg .Core .UseSystemEnv {
231
+ if cfg .Kernel .UseSystemEnv {
232
232
if err := sess .SetEnv (os .Environ ()... ); err != nil {
233
233
return nil , err
234
234
}
0 commit comments