1
0
This repository has been archived on 2024-11-10. You can view files and clone it, but cannot push or open issues or pull requests.
Lakka-rk322x/packages/addons/service/docker/patches/docker-100.03-remove-marshaljson.patch
2020-11-08 11:35:08 +00:00

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