Browse code

Merge pull request #40118 from thaJeztah/fix_master_lint

Add GoDoc to fix linting validation

Kirill Kolyshkin authored on 2019/10/22 06:38:18
Showing 2 changed files
... ...
@@ -36,6 +36,7 @@ func NewArgs(initialArgs ...KeyValuePair) Args {
36 36
 	return args
37 37
 }
38 38
 
39
+// Keys returns all the keys in list of Args
39 40
 func (args Args) Keys() []string {
40 41
 	keys := make([]string, 0, len(args.fields))
41 42
 	for k := range args.fields {
... ...
@@ -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()