mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-15 17:50:49 +00:00
nfd-master: lint fixes
This commit is contained in:
parent
80becea590
commit
853609f721
2 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ func TestUpdateNodeFeatures(t *testing.T) {
|
|||
fakeAnnotations := map[string]string{"version": version.Get()}
|
||||
fakeExtResources := ExtendedResources{"source-feature.1": "", "source-feature.2": ""}
|
||||
fakeFeatureLabelNames := make([]string, 0, len(fakeFeatureLabels))
|
||||
for k, _ := range fakeFeatureLabels {
|
||||
for k := range fakeFeatureLabels {
|
||||
fakeFeatureLabelNames = append(fakeFeatureLabelNames, k)
|
||||
}
|
||||
sort.Strings(fakeFeatureLabelNames)
|
||||
|
|
|
@ -105,7 +105,7 @@ func createStatusOp(verb string, resource string, path string, value string) sta
|
|||
}
|
||||
|
||||
// Create new NfdMaster server instance.
|
||||
func NewNfdMaster(args Args) (*nfdMaster, error) {
|
||||
func NewNfdMaster(args Args) (NfdMaster, error) {
|
||||
nfd := &nfdMaster{args: args, ready: make(chan bool, 1)}
|
||||
|
||||
// Check TLS related args
|
||||
|
@ -191,7 +191,7 @@ func (m *nfdMaster) WaitForReady(timeout time.Duration) bool {
|
|||
select {
|
||||
case ready, ok := <-m.ready:
|
||||
// Ready if the flag is true or the channel has been closed
|
||||
if ready == true || ok == false {
|
||||
if ready || !ok {
|
||||
return true
|
||||
}
|
||||
case <-time.After(timeout):
|
||||
|
|
Loading…
Reference in a new issue