34 lines
925 B
Diff
34 lines
925 B
Diff
--- a/components/engine/daemon/config/builder.go
|
|
+++ b/components/engine/daemon/config/builder.go
|
|
@@ -2,8 +2,6 @@
|
|
|
|
import (
|
|
"encoding/json"
|
|
- "fmt"
|
|
- "sort"
|
|
"strings"
|
|
|
|
"github.com/docker/docker/api/types/filters"
|
|
@@ -19,21 +17,6 @@
|
|
// BuilderGCFilter contains garbage-collection filter rules for a BuildKit builder
|
|
type BuilderGCFilter filters.Args
|
|
|
|
-// MarshalJSON returns a JSON byte representation of the BuilderGCFilter
|
|
-func (x *BuilderGCFilter) MarshalJSON() ([]byte, error) {
|
|
- f := filters.Args(*x)
|
|
- keys := f.Keys()
|
|
- sort.Strings(keys)
|
|
- arr := make([]string, 0, len(keys))
|
|
- for _, k := range keys {
|
|
- values := f.Get(k)
|
|
- for _, v := range values {
|
|
- arr = append(arr, fmt.Sprintf("%s=%s", k, v))
|
|
- }
|
|
- }
|
|
- return json.Marshal(arr)
|
|
-}
|
|
-
|
|
// UnmarshalJSON fills the BuilderGCFilter values structure from JSON input
|
|
func (x *BuilderGCFilter) UnmarshalJSON(data []byte) error {
|
|
var arr []string
|