var defaultNamespacedPruneResources … var defaultNonNamespacedPruneResources … type Resource … func (pr Resource) String() string { … } // if namespace is explicitly specified, the default allow list should not include non-namespaced resources. // if pruneResources is specified by user, respect the user setting. func GetRESTMappings(mapper meta.RESTMapper, pruneResources []Resource, namespaceSpecified bool) (namespaced, nonNamespaced []*meta.RESTMapping, err error) { … } func ParseResources(mapper meta.RESTMapper, gvks []string) ([]Resource, error) { … }