File tree 3 files changed +15
-7
lines changed
3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ require (
6
6
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
7
7
github.com/spf13/cobra v1.7.0
8
8
github.com/urfave/cli/v2 v2.25.0
9
- kcl-lang.io/kcl-go v0.6.1
9
+ kcl-lang.io/kcl-go v0.6.2-0.20231025053208-f9ea93c99c1a
10
10
kcl-lang.io/kcl-openapi v0.5.1
11
11
kcl-lang.io/kpm v0.3.7
12
12
)
Original file line number Diff line number Diff line change @@ -1276,8 +1276,8 @@ k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrC
1276
1276
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 /go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0 =
1277
1277
kcl-lang.io/kcl-artifact-go v0.6.0 h1:J/1FKzgGRqzFDkq0amBWxCdXXRMrtg5oT3IGtoo9sgU =
1278
1278
kcl-lang.io/kcl-artifact-go v0.6.0 /go.mod h1:c07mqi9Hu2UjPW7lYfHhAAWOlZiB7lo7Vkr4jL5ov/M =
1279
- kcl-lang.io/kcl-go v0.6.1 h1:we/e3qvllsOoQj0YQht+yNxI+QFLWEmYn4FQ3zAvv9E =
1280
- kcl-lang.io/kcl-go v0.6.1 /go.mod h1:1/xEscOhVGNabr9+rYC5peFDIjphbthYqk8UyHzaPRk =
1279
+ kcl-lang.io/kcl-go v0.6.2-0.20231025053208-f9ea93c99c1a h1:ds5HFWjbt8+ns8rzvm3sH4Z9807sI96eSmISO2F8w9M =
1280
+ kcl-lang.io/kcl-go v0.6.2-0.20231025053208-f9ea93c99c1a /go.mod h1:1/xEscOhVGNabr9+rYC5peFDIjphbthYqk8UyHzaPRk =
1281
1281
kcl-lang.io/kcl-openapi v0.5.1 h1:cnXANaoLQ0nUW4I8s147g8NcXYoXfb8xPnpNvAZI9pY =
1282
1282
kcl-lang.io/kcl-openapi v0.5.1 /go.mod h1:Ai9mFztCVKkRSFabczO/r5hCNdqaNtAc2ZIRxTeV0Mk =
1283
1283
kcl-lang.io/kpm v0.3.7 h1:peemi1gndI4iNLJ2wmZwg2f8t98n8V/l5SC3hxKnAWE =
Original file line number Diff line number Diff line change @@ -147,7 +147,16 @@ func (o *RunOptions) writer() (io.Writer, error) {
147
147
}
148
148
}
149
149
150
+ // / FilterByPath filters values using path selectors.
151
+ func FilterByPath (result * kcl.KCLResultList , pathSelectors []string ) * kcl.KCLResultList {
152
+ if len (pathSelectors ) == 0 || result == nil {
153
+ return result
154
+ }
155
+ return result
156
+ }
157
+
150
158
func (o * RunOptions ) writeResult (result * kcl.KCLResultList ) error {
159
+
151
160
if result == nil {
152
161
return nil
153
162
}
@@ -196,8 +205,9 @@ func CompileOptionFromCli(o *RunOptions) *opt.CompileOptions {
196
205
197
206
// --overrides, -O
198
207
if len (o .Overrides ) != 0 {
199
- for _ , override := range o .Overrides {
200
- opts .Merge (kcl .WithOverrides (override ))
208
+ opts .Merge (kcl .WithOverrides (o .Overrides ... ))
209
+ if o .Debug {
210
+ opts .PrintOverrideAst = true
201
211
}
202
212
}
203
213
@@ -218,7 +228,5 @@ func CompileOptionFromCli(o *RunOptions) *opt.CompileOptions {
218
228
// --vendor
219
229
opts .SetVendor (o .Vendor )
220
230
221
- // TODO: path_selector
222
-
223
231
return opts
224
232
}
You can’t perform that action at this time.
0 commit comments