<p>I am rewriting the logic of Kubernetes' NodeResourcesFit plugin, I want to use <code>preFilterState</code> like <a href="https://github.com/kubernetes/kubernetes/blob/419e0ec3d2512afd8c1f35a44862f856bc4ac10f/pkg/scheduler/framework/plugins/noderesources/fit.go#L91" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/blob/419e0ec3d2512afd8c1f35a44862f856bc4ac10f/pkg/scheduler/framework/plugins/noderesources/fit.go#L91</a>, so I import it in the code:</p>
<p><code>import &quot;k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources&quot;</code></p>
<p>and use it just like:</p>
<p><code>s, ok := c.(*noderesources.preFilterState)</code></p>
<p>However I get an error: undefined: noderesources.preFilterState</p>
<p>I am not familiar with Kubernetes, so I don't know what is wrong with it. Thanks for your patience.</p>
<p>I try to print <code>noderesources.Name</code> but it failed too.</p>

examine Lee
<p>According to the link you're providing, <code>preFilterState</code> is not exported and therefore not accessible from the outside of the package.
It has nothing to do with Kubernetes but with go:</p>
<ul>
<li>example: <a href="https://go.dev/tour/basics/3" rel="nofollow noreferrer">https://go.dev/tour/basics/3</a></li>
<li>doc: <a href="https://go.dev/doc/effective_go#names" rel="nofollow noreferrer">https://go.dev/doc/effective_go#names</a></li>
</ul>
<p>I have a feeling you are starting with go, I recommend you play a bit with the fundamentals of the language and maybe use an IDE/Text editor with intellisense to be able to know what you can and cannot call.</p>
