From e119b01dd71e1f8e45e5b86da0fe1e2436d68024 Mon Sep 17 00:00:00 2001 From: koba1t Date: Tue, 11 Jul 2023 23:16:35 +0900 Subject: [PATCH] implement ResourceGenerator and change call the accumulateResources function to ResourceGenerator --- api/builtins/builtins.go | 1 + api/internal/accumulator/resaccumulator.go | 5 +- api/internal/builtins/ResourceGenerator.go | 20 ++-- .../plugins/execplugin/execplugin_test.go | 6 +- api/internal/target/kusttarget.go | 94 +++++++++++-------- .../target/kusttarget_configplugin.go | 10 +- api/krusty/accumulation_test.go | 2 +- api/resmap/resmap.go | 30 +++++- .../krmfunction/funcwrappersrc/go.mod.src | 4 +- .../krmfunction/funcwrappersrc/main.go | 3 +- hack/for-each-module.sh | 6 +- hack/generateBuiltinKrmFunctions.sh | 9 +- .../resourcegenerator/ResourceGenerator.go | 20 ++-- .../ResourceGenerator_test.go | 32 +++++++ plugin/builtin/resourcegenerator/go.mod | 12 ++- plugin/builtin/resourcegenerator/go.sum | 10 ++ 16 files changed, 186 insertions(+), 78 deletions(-) diff --git a/api/builtins/builtins.go b/api/builtins/builtins.go index 4bf864375a1..3a6255f4227 100644 --- a/api/builtins/builtins.go +++ b/api/builtins/builtins.go @@ -29,6 +29,7 @@ type ( ValueAddTransformerPlugin = internal.ValueAddTransformerPlugin ) +//nolint:gochecknoglobals var ( NewAnnotationsTransformerPlugin = internal.NewAnnotationsTransformerPlugin NewResourceGeneratorPlugin = internal.NewResourceGeneratorPlugin diff --git a/api/internal/accumulator/resaccumulator.go b/api/internal/accumulator/resaccumulator.go index 0f4008c97ff..55a210e5f07 100644 --- a/api/internal/accumulator/resaccumulator.go +++ b/api/internal/accumulator/resaccumulator.go @@ -14,9 +14,8 @@ import ( "sigs.k8s.io/kustomize/kyaml/resid" ) -// ResAccumulator accumulates resources and the rules -// used to customize those resources. It's a ResMap -// plus stuff needed to modify the ResMap. +// ResAccumulator accumulates resources and the rules used to customize those resources. +// It's a ResMap plus stuff needed to modify the ResMap. type ResAccumulator struct { resMap resmap.ResMap tConfig *builtinconfig.TransformerConfig diff --git a/api/internal/builtins/ResourceGenerator.go b/api/internal/builtins/ResourceGenerator.go index 61c723cc8d3..6aed5096a93 100644 --- a/api/internal/builtins/ResourceGenerator.go +++ b/api/internal/builtins/ResourceGenerator.go @@ -4,23 +4,31 @@ package builtins import ( + "fmt" + "sigs.k8s.io/kustomize/api/resmap" + "sigs.k8s.io/kustomize/kyaml/yaml" ) type ResourceGeneratorPlugin struct { h *resmap.PluginHelpers - resource string + Resource string `json:"resource" yaml:"resource"` } -func (p *ResourceGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) (err error) { +func (p *ResourceGeneratorPlugin) Config(h *resmap.PluginHelpers, config []byte) error { p.h = h - return + if err := yaml.Unmarshal(config, p); err != nil { + return fmt.Errorf("failed to unmarshal ResourceGenerator config: %w", err) + } + return nil } func (p *ResourceGeneratorPlugin) Generate() (resmap.ResMap, error) { - - resourceBytes := []byte(p.resource) //idiot - return p.h.ResmapFactory().NewResMapFromBytes(resourceBytes) + resmap, err := p.h.AccumulateResource(p.Resource) + if err != nil { + return nil, fmt.Errorf("failed to Accumulate: %w", err) + } + return resmap, nil } func NewResourceGeneratorPlugin() resmap.GeneratorPlugin { diff --git a/api/internal/plugins/execplugin/execplugin_test.go b/api/internal/plugins/execplugin/execplugin_test.go index b20626297e3..45c201c51df 100644 --- a/api/internal/plugins/execplugin/execplugin_test.go +++ b/api/internal/plugins/execplugin/execplugin_test.go @@ -25,8 +25,7 @@ func TestExecPluginConfig(t *testing.T) { err := fSys.WriteFile("sed-input.txt", []byte(` s/$FOO/foo/g s/$BAR/bar baz/g - \ \ \ -`)) + \ \ \ `)) require.NoError(t, err) ldr, err := fLdr.NewLoader( fLdr.RestrictionRootOnly, filesys.Separator, fSys) @@ -65,8 +64,7 @@ s/$BAR/bar baz/g t.Fatalf("unexpected err: %v", err) } err = p.Config( - resmap.NewPluginHelpers(ldr, pvd.GetFieldValidator(), rf, pc), - yaml) + resmap.NewPluginHelpers(ldr, pvd.GetFieldValidator(), rf, pc), yaml) require.NoError(t, err) expected := "someteam.example.com/v1/sedtransformer/SedTransformer" diff --git a/api/internal/target/kusttarget.go b/api/internal/target/kusttarget.go index 64fb74fc116..b63fd4f556a 100644 --- a/api/internal/target/kusttarget.go +++ b/api/internal/target/kusttarget.go @@ -34,7 +34,7 @@ type KustTarget struct { ldr ifc.Loader validator ifc.Validator rFactory *resmap.Factory - pLdr *loader.Loader + pLdr *loader.Loader // plugin loader origin *resource.Origin } @@ -176,6 +176,15 @@ func (kt *KustTarget) addHashesToNames( return ra.Transform(p) } +// AccumulateResource fills the given resourceAccumulator with resources read from the given path from external package. +func (kt *KustTarget) AccumulateResource(path string) (rm resmap.ResMap, err error) { + ra := accumulator.MakeEmptyAccumulator() + if err := kt.accumulateResource(ra, path); err != nil { + return nil, fmt.Errorf("failed to accumulateResource: %w", err) + } + return ra.ResMap(), nil +} + // AccumulateTarget returns a new ResAccumulator, // holding customized resources and the data/rules used // to do so. The name back references and vars are @@ -197,12 +206,6 @@ func (kt *KustTarget) AccumulateTarget() ( // ra should be empty when this KustTarget is a Kustomization, or the ra of the parent if this KustTarget is a Component // (or empty if the Component does not have a parent). func (kt *KustTarget) accumulateTarget(ra *accumulator.ResAccumulator) (resRa *accumulator.ResAccumulator, err error) { - // read `resources` - ra, err = kt.accumulateResources(ra, kt.kustomization.Resources) // it needs to remove - if err != nil { - return nil, errors.WrapPrefixf(err, "accumulating resources") - } - tConfig, err := builtinconfig.MakeTransformerConfig( kt.ldr, kt.kustomization.Configurations) if err != nil { @@ -419,40 +422,50 @@ func (kt *KustTarget) removeValidatedByLabel(rm resmap.ResMap) error { func (kt *KustTarget) accumulateResources( ra *accumulator.ResAccumulator, paths []string) (*accumulator.ResAccumulator, error) { for _, path := range paths { - // try loading resource as file then as base (directory or git repository) - if errF := kt.accumulateFile(ra, path); errF != nil { - // not much we can do if the error is an HTTP error so we bail out - if errors.Is(errF, load.ErrHTTP) { - return nil, errF - } - ldr, err := kt.ldr.New(path) - if err != nil { - if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file - return nil, errF - } - return nil, errors.WrapPrefixf( - err, "accumulation err='%s'", errF.Error()) - } - // store the origin, we'll need it later - origin := kt.origin.Copy() - if kt.origin != nil { - kt.origin = kt.origin.Append(path) - ra, err = kt.accumulateDirectory(ra, ldr, false) - // after we are done recursing through the directory, reset the origin - kt.origin = &origin - } else { - ra, err = kt.accumulateDirectory(ra, ldr, false) + if err := kt.accumulateResource(ra, path); err != nil { + return nil, err + } + } + return ra, nil +} + +// accumulateResource fills the given resourceAccumulator with resources read from the given path. +func (kt *KustTarget) accumulateResource(ra *accumulator.ResAccumulator, path string) error { + // try loading resource as file then as base (directory or git repository) + if errF := kt.accumulateFile(ra, path); errF != nil { //nolint:nestif + // not much we can do if the error is an HTTP error so we bail out + if errors.Is(errF, load.ErrHTTP) { + return errF + } + ldr, err := kt.ldr.New(path) + if err != nil { + // Some error occurred while tyring to decode YAML file + if kusterr.IsMalformedYAMLError(errF) { + return errF } - if err != nil { - if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file - return nil, errF - } - return nil, errors.WrapPrefixf( - err, "accumulation err='%s'", errF.Error()) + return errors.WrapPrefixf( + err, "accumulation err='%s'", errF.Error()) + } + // store the origin, we'll need it later + origin := kt.origin.Copy() + if kt.origin != nil { + kt.origin = kt.origin.Append(path) + _, err = kt.accumulateDirectory(ra, ldr, false) + // after we are done recursing through the directory, reset the origin + kt.origin = &origin + } else { + _, err = kt.accumulateDirectory(ra, ldr, false) + } + if err != nil { + // Some error occurred while tyring to decode YAML file + if kusterr.IsMalformedYAMLError(errF) { + return errF } + return errors.WrapPrefixf( + err, "accumulation err='%s'", errF.Error()) } } - return ra, nil + return nil } // accumulateResources fills the given resourceAccumulator @@ -527,8 +540,7 @@ func (kt *KustTarget) accumulateDirectory( return nil, errors.WrapPrefixf( err, "recursed accumulation of path '%s'", ldr.Root()) } - err = ra.MergeAccumulator(subRa) - if err != nil { + if err := ra.MergeAccumulator(subRa); err != nil { return nil, errors.WrapPrefixf( err, "recursed merging from path '%s'", ldr.Root()) } @@ -569,8 +581,8 @@ func (kt *KustTarget) configureBuiltinPlugin( } } err = p.Config( - resmap.NewPluginHelpers( - kt.ldr, kt.validator, kt.rFactory, kt.pLdr.Config()), + resmap.NewPluginHelpersWithKt( + kt.ldr, kt.validator, kt.rFactory, kt.pLdr.Config(), kt), y) if err != nil { return errors.WrapPrefixf( diff --git a/api/internal/target/kusttarget_configplugin.go b/api/internal/target/kusttarget_configplugin.go index 859f1e1ef1d..d47aed26474 100644 --- a/api/internal/target/kusttarget_configplugin.go +++ b/api/internal/target/kusttarget_configplugin.go @@ -109,6 +109,11 @@ func (kt *KustTarget) configureBuiltinTransformers(tc *builtinconfig.Transformer type gFactory func() resmap.GeneratorPlugin +type ResourceArgs struct { + Resource string `json:"resource,omitempty" yaml:"resource,omitempty"` + Kt *KustTarget `json:"kusttarget,omitempty" yaml:"kusttarget,omitempty"` +} + var generatorConfigurators = map[builtinhelpers.BuiltinPluginType]func( kt *KustTarget, bpt builtinhelpers.BuiltinPluginType, @@ -116,11 +121,12 @@ var generatorConfigurators = map[builtinhelpers.BuiltinPluginType]func( builtinhelpers.ResourceGenerator: func(kt *KustTarget, bpt builtinhelpers.BuiltinPluginType, f gFactory) ( result []resmap.Generator, err error) { var c struct { - resource string + Resource string `json:"resource" yaml:"resource"` } for _, args := range kt.kustomization.Resources { - c.resource = args + c.Resource = args p := f() + if err := kt.configureBuiltinPlugin(p, c, bpt); err != nil { return nil, err } diff --git a/api/krusty/accumulation_test.go b/api/krusty/accumulation_test.go index 00bb7aa3a9c..afb27886379 100644 --- a/api/krusty/accumulation_test.go +++ b/api/krusty/accumulation_test.go @@ -200,7 +200,7 @@ resources: } buildError := func(tc testcase) string { const ( - prefix = "accumulating resources" + prefix = "failed to accumulateResource" filePrefixf = "accumulating resources from '%s'" fileWrapperIfDirf = "accumulation err='%s'" separator = ": " diff --git a/api/resmap/resmap.go b/api/resmap/resmap.go index ea913ba6ba3..c52190fea67 100644 --- a/api/resmap/resmap.go +++ b/api/resmap/resmap.go @@ -6,6 +6,8 @@ package resmap import ( + "fmt" + "sigs.k8s.io/kustomize/api/ifc" "sigs.k8s.io/kustomize/api/resource" "sigs.k8s.io/kustomize/api/types" @@ -49,9 +51,16 @@ type Configurable interface { // NewPluginHelpers makes an instance of PluginHelpers. func NewPluginHelpers( - ldr ifc.Loader, v ifc.Validator, rf *Factory, - pc *types.PluginConfig) *PluginHelpers { - return &PluginHelpers{ldr: ldr, v: v, rf: rf, pc: pc} + ldr ifc.Loader, v ifc.Validator, rf *Factory, pc *types.PluginConfig, +) *PluginHelpers { + return &PluginHelpers{ldr: ldr, v: v, rf: rf, pc: pc, kt: nil} // TODO(koba1t): check to influence of kt is null +} + +// NewPluginHelpersWithKt makes an instance of PluginHelpers additional kt with args. +func NewPluginHelpersWithKt( + ldr ifc.Loader, v ifc.Validator, rf *Factory, pc *types.PluginConfig, kt KustTargetInterface, +) *PluginHelpers { + return &PluginHelpers{ldr: ldr, v: v, rf: rf, pc: pc, kt: kt} } // PluginHelpers holds things that any or all plugins might need. @@ -62,6 +71,21 @@ type PluginHelpers struct { v ifc.Validator rf *Factory pc *types.PluginConfig + kt KustTargetInterface +} + +// KustTargetInterface is the interface for exec accumulate functions from external packages. +type KustTargetInterface interface { + AccumulateResource(path string) (ResMap, error) +} + +// AccumulateResources exec target.(*KustTarget).AccumulateResource() +func (c *PluginHelpers) AccumulateResource(path string) (ResMap, error) { + resmap, err := c.kt.AccumulateResource(path) + if err != nil { + return nil, fmt.Errorf("failed to AccumulateResource in internal `target` pkg: %w", err) + } + return resmap, nil } func (c *PluginHelpers) GeneralConfig() *types.PluginConfig { diff --git a/cmd/pluginator/internal/krmfunction/funcwrappersrc/go.mod.src b/cmd/pluginator/internal/krmfunction/funcwrappersrc/go.mod.src index 5c9bf2bd267..5e778e75d32 100644 --- a/cmd/pluginator/internal/krmfunction/funcwrappersrc/go.mod.src +++ b/cmd/pluginator/internal/krmfunction/funcwrappersrc/go.mod.src @@ -4,7 +4,7 @@ go 1.20 require ( github.com/spf13/cobra v1.4.0 - sigs.k8s.io/kustomize/api v0.12.1 - sigs.k8s.io/kustomize/kyaml v0.13.9 + sigs.k8s.io/kustomize/api v0.14.0 + sigs.k8s.io/kustomize/kyaml v0.14.3 sigs.k8s.io/yaml v1.2.0 ) diff --git a/cmd/pluginator/internal/krmfunction/funcwrappersrc/main.go b/cmd/pluginator/internal/krmfunction/funcwrappersrc/main.go index ad287238a0b..6c2e472f78d 100644 --- a/cmd/pluginator/internal/krmfunction/funcwrappersrc/main.go +++ b/cmd/pluginator/internal/krmfunction/funcwrappersrc/main.go @@ -15,13 +15,12 @@ import ( "sigs.k8s.io/kustomize/kyaml/fn/framework" ) -//nolint func main() { var plugin resmap.Configurable p := provider.NewDefaultDepProvider() resmapFactory := resmap.NewFactory(p.GetResourceFactory()) pluginHelpers := resmap.NewPluginHelpers( - nil, p.GetFieldValidator(), resmapFactory, types.DisabledPluginConfig()) + nil, p.GetFieldValidator(), resmapFactory, types.DisabledPluginConfig()) // TODO(koba1t): check to influence of kt is null processor := framework.ResourceListProcessorFunc(func(resourceList *framework.ResourceList) error { resMap, err := resmapFactory.NewResMapFromRNodeSlice(resourceList.Items) diff --git a/hack/for-each-module.sh b/hack/for-each-module.sh index 6017d890b8e..2ebf22f1121 100755 --- a/hack/for-each-module.sh +++ b/hack/for-each-module.sh @@ -15,7 +15,7 @@ fi cmd=$1 skip_pattern="${2-}" -expected_module_count=${3:-45} +expected_module_count=${3:-46} seen=() # Hack scripts must be run from the root of the repository. @@ -25,11 +25,11 @@ export KUSTOMIZE_ROOT # verify all modules pass validation for i in $(find . -name go.mod -not -path "./site/*" -not -path "$skip_pattern"); do pushd . - cd $(dirname $i); + cd $(dirname "$i"); set +x dir=$(pwd) - module="${dir#$KUSTOMIZE_ROOT}" + module="${dir#"$KUSTOMIZE_ROOT"}" echo -e "\n----------------------------------------------------------" echo "Running command in $module" echo -e "----------------------------------------------------------" diff --git a/hack/generateBuiltinKrmFunctions.sh b/hack/generateBuiltinKrmFunctions.sh index 4c12604f736..08c2bb6b400 100755 --- a/hack/generateBuiltinKrmFunctions.sh +++ b/hack/generateBuiltinKrmFunctions.sh @@ -15,6 +15,7 @@ builtinPlugins=(AnnotationsTransformer \ PrefixSuffixTransformer \ PrefixTransformer \ SuffixTransformer \ + ResourceGenerator \ ReplicaCountTransformer \ SecretGenerator \ ValueAddTransformer \ @@ -29,14 +30,14 @@ fi # Install pluginator -pushd ../cmd/pluginator +pushd ../cmd/pluginator || exit make install -popd +popd || exit for pluginName in ${builtinPlugins[@]}; do - dirName=$(echo $pluginName | tr '[:upper:]' '[:lower:]') + dirName=$(echo "$pluginName" | tr '[:upper:]' '[:lower:]') srcPath="$builtinPluginDir/$dirName/$pluginName.go" dstPath="$KRM_FUNCTION_DIR/$dirName" - pluginator krm -i $srcPath -o $dstPath + pluginator krm -i "$srcPath" -o "$dstPath" done diff --git a/plugin/builtin/resourcegenerator/ResourceGenerator.go b/plugin/builtin/resourcegenerator/ResourceGenerator.go index ba2c4b3f376..fb38de23c42 100644 --- a/plugin/builtin/resourcegenerator/ResourceGenerator.go +++ b/plugin/builtin/resourcegenerator/ResourceGenerator.go @@ -5,23 +5,31 @@ package main import ( + "fmt" + "sigs.k8s.io/kustomize/api/resmap" + "sigs.k8s.io/kustomize/kyaml/yaml" ) type plugin struct { h *resmap.PluginHelpers - resource string + Resource string `json:"resource" yaml:"resource"` } var KustomizePlugin plugin //nolint:gochecknoglobals -func (p *plugin) Config(h *resmap.PluginHelpers, config []byte) (err error) { +func (p *plugin) Config(h *resmap.PluginHelpers, config []byte) error { p.h = h - return + if err := yaml.Unmarshal(config, p); err != nil { + return fmt.Errorf("failed to unmarshal ResourceGenerator config: %w", err) + } + return nil } func (p *plugin) Generate() (resmap.ResMap, error) { - - resourceBytes := []byte(p.resource) //idiot - return p.h.ResmapFactory().NewResMapFromBytes(resourceBytes) + resmap, err := p.h.AccumulateResource(p.Resource) + if err != nil { + return nil, fmt.Errorf("failed to Accumulate: %w", err) + } + return resmap, nil } diff --git a/plugin/builtin/resourcegenerator/ResourceGenerator_test.go b/plugin/builtin/resourcegenerator/ResourceGenerator_test.go index 13c5146813d..c6d4346fa0e 100644 --- a/plugin/builtin/resourcegenerator/ResourceGenerator_test.go +++ b/plugin/builtin/resourcegenerator/ResourceGenerator_test.go @@ -5,7 +5,39 @@ package main_test import ( "testing" + + kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest" ) func TestResourceGenerator(t *testing.T) { + th := kusttest_test.MakeEnhancedHarness(t). + PrepBuiltin("ResourceGenerator") + defer th.Reset() + + th.WriteF("config.yaml", ` +apiVersion: v1 +kind: ConfigMap +metadata: + name: myMap +data: + COLOR: red + FRUIT: apple +`) + rm := th.LoadAndRunGenerator(` +apiVersion: builtin +kind: ResourceGenerator +metadata: + name: myMap +resource: config.yaml +`) + + th.AssertActualEqualsExpected(rm, ` +apiVersion: v1 +kind: ConfigMap +metadata: + name: myMap +data: + COLOR: red + FRUIT: apple +`) } diff --git a/plugin/builtin/resourcegenerator/go.mod b/plugin/builtin/resourcegenerator/go.mod index bc5c204fdbe..797a97f160f 100644 --- a/plugin/builtin/resourcegenerator/go.mod +++ b/plugin/builtin/resourcegenerator/go.mod @@ -4,6 +4,16 @@ go 1.20 require sigs.k8s.io/kustomize/api v0.13.4 +require ( + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/imdario/mergo v0.3.6 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.8.1 // indirect + go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect +) + require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-errors/errors v1.4.2 // indirect @@ -23,7 +33,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 // indirect - sigs.k8s.io/kustomize/kyaml v0.14.2 // indirect + sigs.k8s.io/kustomize/kyaml v0.14.3 sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/plugin/builtin/resourcegenerator/go.sum b/plugin/builtin/resourcegenerator/go.sum index 0b0a2fc5327..f63a61abf00 100644 --- a/plugin/builtin/resourcegenerator/go.sum +++ b/plugin/builtin/resourcegenerator/go.sum @@ -1,8 +1,12 @@ +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -22,7 +26,9 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -36,9 +42,11 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= @@ -51,6 +59,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= +go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= +golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=