Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit b2a43ee

Browse files
committed
Add GoDoc to fix linting validation
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> Upstream-commit: e5a0bc6a50ef924ed6c0f333693857ab22ca47fa Component: engine
1 parent ff0c0a3 commit b2a43ee

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

components/engine/api/types/filters/parse.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func NewArgs(initialArgs ...KeyValuePair) Args {
3636
return args
3737
}
3838

39+
// Keys returns all the keys in list of Args
3940
func (args Args) Keys() []string {
4041
keys := make([]string, 0, len(args.fields))
4142
for k := range args.fields {

components/engine/daemon/config/builder.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ type BuilderGCRule struct {
1616
KeepStorage string `json:",omitempty"`
1717
}
1818

19+
// BuilderGCFilter contains garbage-collection filter rules for a BuildKit builder
1920
type BuilderGCFilter filters.Args
2021

22+
// MarshalJSON returns a JSON byte representation of the BuilderGCFilter
2123
func (x *BuilderGCFilter) MarshalJSON() ([]byte, error) {
2224
f := filters.Args(*x)
2325
keys := f.Keys()
@@ -32,6 +34,7 @@ func (x *BuilderGCFilter) MarshalJSON() ([]byte, error) {
3234
return json.Marshal(arr)
3335
}
3436

37+
// UnmarshalJSON fills the BuilderGCFilter values structure from JSON input
3538
func (x *BuilderGCFilter) UnmarshalJSON(data []byte) error {
3639
var arr []string
3740
f := filters.NewArgs()

0 commit comments

Comments
 (0)