The validate step in CI was broken, due to a combination of
086b4541cf9d27d9c2654f316a6f69b0d9caedd9, fbdd437d295595e88466b33a550a8707b9ebb709,
and 85733620ebea3da75abe7d732043354aa0883f8a being merged to master.
```
api/types/filters/parse.go:39:1: exported method `Args.Keys` should have comment or be unexported (golint)
func (args Args) Keys() []string {
^
daemon/config/builder.go:19:6: exported type `BuilderGCFilter` should have comment or be unexported (golint)
type BuilderGCFilter filters.Args
^
daemon/config/builder.go:21:1: exported method `BuilderGCFilter.MarshalJSON` should have comment or be unexported (golint)
func (x *BuilderGCFilter) MarshalJSON() ([]byte, error) {
^
daemon/config/builder.go:35:1: exported method `BuilderGCFilter.UnmarshalJSON` should have comment or be unexported (golint)
func (x *BuilderGCFilter) UnmarshalJSON(data []byte) error {
^
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9d726f1c18216a127572310fccb0fab8fcfdc678)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
... | ... |
@@ -16,8 +16,10 @@ type BuilderGCRule struct { |
16 | 16 |
KeepStorage string `json:",omitempty"` |
17 | 17 |
} |
18 | 18 |
|
19 |
+// BuilderGCFilter contains garbage-collection filter rules for a BuildKit builder |
|
19 | 20 |
type BuilderGCFilter filters.Args |
20 | 21 |
|
22 |
+// MarshalJSON returns a JSON byte representation of the BuilderGCFilter |
|
21 | 23 |
func (x *BuilderGCFilter) MarshalJSON() ([]byte, error) { |
22 | 24 |
f := filters.Args(*x) |
23 | 25 |
keys := f.Keys() |
... | ... |
@@ -32,6 +34,7 @@ func (x *BuilderGCFilter) MarshalJSON() ([]byte, error) { |
32 | 32 |
return json.Marshal(arr) |
33 | 33 |
} |
34 | 34 |
|
35 |
+// UnmarshalJSON fills the BuilderGCFilter values structure from JSON input |
|
35 | 36 |
func (x *BuilderGCFilter) UnmarshalJSON(data []byte) error { |
36 | 37 |
var arr []string |
37 | 38 |
f := filters.NewArgs() |