Debian Codegraph @

api/internal/plugins/loader/load_go_plugin_disabled.go

raw
1 // Copyright 2024 The Kubernetes Authors.
2 // SPDX-License-Identifier: Apache-2.0
3
4 // The build tag "kustomize_disable_go_plugin_support" is used to deactivate the
5 // kustomize API's dependency on the "plugins" package. This is beneficial for
6 // applications that need to embed it but do not have requirements for dynamic
7 // Go plugins.
8 // Including plugins as a dependency can lead to an increase in binary size due
9 // to the population of ELF's sections such as .dynsym and .dynstr.
10 // By utilizing this flag, applications have the flexibility to exclude the
11 // import if they do not require support for dynamic Go plugins.
12 //go:build kustomize_disable_go_plugin_support
13
14 package loader
15
16 import (
17 "fmt"
18
19 "sigs.k8s.io/kustomize/api/resmap"
20 "sigs.k8s.io/kustomize/kyaml/resid"
21 )
22
23 func (l *Loader) loadGoPlugin(_ resid.ResId, _ string) (resmap.Configurable, error) {
24 return nil, fmt.Errorf("plugin load is disabled")
25 }